Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
RoleClaimType Property

ClaimsIdentity.RoleClaimType Property

.NET Framework 4.6 and 4.5

Gets the claim type that will be interpreted as a .NET Framework role among the claims in this claims identity.

Namespace:  System.Security.Claims
Assembly:  mscorlib (in mscorlib.dll)

member RoleClaimType : string with get

Property Value

Type: System.String
The role claim type.

The role claim type is the claim type (Claim.Type) that is used when evaluating this identity for the ClaimsPrincipal.IsInRole(String) method. The ClaimsPrincipal.IsInRole(String) method is called to determine whether the current principal is in a specified role. The claims-based model extends this check to use claims presented by the principal. A ClaimsPrincipal object can contain one or more ClaimsIdentity objects and each identity object can contain multiple Claim objects. The RoleClaimType property specifies the claim type of the claim that should be used to provide the value for the role when evaluating this ClaimsIdentity object. The property is set by the constructor. A common value is ClaimTypes.Role.

.NET Framework

Supported in: 4.6, 4.5
© 2015 Microsoft