I am using Azure B2C custom policy to authenticate the user using Azure AD with OpenId Connect. For this, I have followed the steps mentioned in Set up sign-in with an Azure AD account by using custom policies - Azure AD B2C. All the information provided in the document seems to work fine.
Apart from the information provided in the jwt token, I also need the userPrincipalName ([email protected]). I need to have UPN because not all the users have the email in the tenant. So when I added userPrincipalName in the output claim, I get below output in the token.
"upn": "[email protected]"
I want to know if it is possible to fetch the value of userPrincipalName as [email protected] and not as described above.
If feasible, how to achieve this?