ClaimsIdentity::RoleClaimType Property

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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)

property String^ RoleClaimType {
	String^ 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.

Universal Windows Platform
Available since 10
.NET Framework
Available since 4.5
Return to top