ClaimsPrincipalExtensions.GetNameIdentifierId(ClaimsPrincipal) Method

Definition

Gets the NameIdentifierId associated with the ClaimsPrincipal.

public static string? GetNameIdentifierId (this System.Security.Claims.ClaimsPrincipal claimsPrincipal);
static member GetNameIdentifierId : System.Security.Claims.ClaimsPrincipal -> string
<Extension()>
Public Function GetNameIdentifierId (claimsPrincipal As ClaimsPrincipal) As String

Parameters

claimsPrincipal
ClaimsPrincipal

The ClaimsPrincipal from which to retrieve the NameIdentifierId claim.

Returns

Name identifier ID of the identity, or null if it cannot be found.

Applies to