I am currently working on a C# webapp that is uses single tenant authentication via OpenIdConnect to authenticate our webapp against Azure AD. The issue that I am encountering is that after authentication, the UPN field is not populated in the HttpContext User object.
The only claims fields that are provided to the hhtp context are the authmethodreferences, emailaddress, identityprovider, objectidentifier, nameidentifier, tenantid and name.
My next thought was to use the optional claims feature, documented here:
https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims#configuring-optional-claims
However, after following those instructions and trying id, access, and SAML to get the UPN field in, none of them ended up working.
Does anyone know what steps I will need to take in order to get the upn field to appear in a single tenant authentication request?