Azure/AzureAuth

how to read claims (payload ?) from return object of get_azure_token function ?

nara3m opened this issue · 1 comments

Update: below query is related to issue 17. I will try solution from there. I will post more updates soon

authentication (and access info) n00b query

First, thanks for AzureAuth package!

Step1: added optional claims for a custom scope (auth_time, email, family_name) in Azure Active Directory settings.
Screenshot from 2021-08-06 15-10-35

Step2: used AzueAuth package to obtain token
myToken <- get_azure_token(scopes, tenant, app, auth_type="client_credentials", password = secret, authorize_args=list(redirect_uri=redirect), use_cache=FALSE, version=2)

Step3: I would like to read payload ?! (auth_time, email, family_name) from received token. But I do not find that info in myToken object (screenshot below).

Screenshot from 2021-08-06 15-03-41

i guess, a broader question is - (if it is possible) how to get user info after authentication using AzureAuth library ?

Thanks in advance

figured out answer - decode_jwt(token)$payload command returns user info in plain text