Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the claim value for the first claim with the specified type.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
public static string FindFirstValue(
this ClaimsIdentity identity,
string claimType
)
public:
[ExtensionAttribute]
static String^ FindFirstValue(
ClaimsIdentity^ identity,
String^ claimType
)
static member FindFirstValue :
identity:ClaimsIdentity *
claimType:string -> string
<ExtensionAttribute>
Public Shared Function FindFirstValue (
identity As ClaimsIdentity,
claimType As String
) As String
Parameters
identity
Type: System.Security.Claims.ClaimsIdentityThe claims identity.
claimType
Type: System.StringThe type of the claim.
Return Value
Type: System.String
The claim value for the first claim with the specified type; otherwise, null if the value doesn’t exist.
See Also
IdentityExtensions Class
Microsoft.AspNet.Identity Namespace
ASP.NET Identity
Return to top