In the template provided for authentication you see an email address displayed in the LoginDisplay component, which is what the Name property of ...Identity, as shown below:
<AuthorizeView><Authorized> Hello, @context.User.Identity.Name!<a href="AzureAD/Account/SignOut">Log out</a></Authorized><NotAuthorized><a href="AzureAD/Account/SignIn">Log in</a></NotAuthorized></AuthorizeView>What I would like to know is how to access other information about an authenticated user. Like a full name, for example, in a simple way. I've found that with Linq you can get data from the Claims property like so:
@context.User.Claims.Where(c => c.Type == "name").FirstOrDefault().Value.ToString()Is that how we should get that information, or is there a better/preferred way to access that data from an authenticated user?