File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -102,15 +102,15 @@ public static string GetDomainHint(this ClaimsPrincipal claimsPrincipal)
102
102
/// Get the display name for the signed-in user, from the <see cref="ClaimsPrincipal"/>
103
103
/// </summary>
104
104
/// <param name="claimsPrincipal">Claims about the user/account</param>
105
- /// <returns>A string containing the display name for the user, as brought by Azure AD v1.0 and v2.0 tokens,
105
+ /// <returns>A string containing the display name for the user, as brought by Azure AD ( v1.0) and Microsoft identity platform ( v2.0) tokens,
106
106
/// or <c>null</c> if the claims cannot be found</returns>
107
107
/// <remarks>See https://docs.microsoft.com/en-us/azure/active-directory/develop/id-tokens#payload-claims </remarks>
108
108
public static string GetDisplayName ( this ClaimsPrincipal claimsPrincipal )
109
109
{
110
- // Attempting the claims brought by an Azure AD v2.0 token first
110
+ // Attempting the claims brought by a v2.0 token first
111
111
string displayName = claimsPrincipal . FindFirstValue ( ClaimConstants . PreferredUserName ) ;
112
112
113
- // Otherwise falling back to the claims brought by an Azure AD v1.0 token
113
+ // Otherwise falling back to the claims brought by a v1.0 token
114
114
if ( string . IsNullOrWhiteSpace ( displayName ) )
115
115
{
116
116
displayName = claimsPrincipal . FindFirstValue ( ClaimsIdentity . DefaultNameClaimType ) ;
You can’t perform that action at this time.
0 commit comments