ClaimsIdentity.RoleClaimType Property


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

 property System::String ^ RoleClaimType { System::String ^ get(); };
public string RoleClaimType { get; }
member this.RoleClaimType : string
Public ReadOnly Property RoleClaimType As String

Property Value

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.

Applies to

See also