I set the user identifier to "user.UserPrincipalName" and it's working fine.
But in another scenario, I have an app registration with ADFS, and upon authentication, Azure AD issues a SAML 2 token (to ADFS) with the user identifier set like this (non-configurable by the administrator):
- if UserType is "Member": claim type "name" is set with the property UserPrincipalName
- if UserType is "Guest" : claim type "name" is set with the property Mail
Here are my questions:
- For consistency, I need to make a similar configuration on the user identifier in the custom enterprise application: how can I configure Azure AD to set the user identifier value to the property UserPrincipalName for "Member" and Mail for "Guest"?
- Overall, what is the best practice to handle user identifier of Guest users? It feels very inconsistent to use a different property depending on the UserType (which is what Azure AD does with my ADFS app registration and that I cannot change).