-
|
Do I need to use the "sub" parameter to query the username/email by other means? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
|
The user object which you obtained that |
Beta Was this translation helpful? Give feedback.
-
|
Sorry I should have been more clear. I meant to get the email that's used to log in to Azure. I believe it's called User Principal Name. |
Beta Was this translation helpful? Give feedback.
-
|
From this library's perspective, the user object is actually all the content inside the ID token. Azure AD's ID token contains these info. The "preferred_username" and/or "email" is approximately what you want. Note that the same doc specifically calls out that UPN is not necessarily unique. |
Beta Was this translation helpful? Give feedback.
-
|
Understood. Thank you very much for your response and I really appreciate the work you put into this package. It's a lifesaver for me. |
Beta Was this translation helpful? Give feedback.
From this library's perspective, the user object is actually all the content inside the ID token. Azure AD's ID token contains these info. The "preferred_username" and/or "email" is approximately what you want. Note that the same doc specifically calls out that UPN is not necessarily unique.