Don't get upn (unique primary name) in Azure AD authentication claims
I am using Azure AD Authentication for my WEB API Application and I can get both ClaimsPrincipal and Claims from the token, but I am not getting "upn" (" http://schemas.xmlsoap.org/ws/2005/05/identity/ claims / upn "), in the claims.
I need for an alias. Does anyone have an idea how I can get the claims.
+3
source to share
2 answers
You will only receive a UPN in a claim if you are a user of that Azure Active Directory, if you list it as another user in that directory, you will not receive a UPN in a claim.
For experiment, you can create a user in the directory with "New User in Organization" as the user type, and then try logging in with the new user and you will see that you will now receive a UPN.
+1
source to share