Returns a value that indicates whether the principal is in the specified role.
Assembly: Microsoft.IdentityModel (in Microsoft.IdentityModel.dll)
The role for which to check. The role is checked against the value of claims that are configured as the role claim type through the RoleClaimType property on one or more of the claims-based identities associated with this principal.
Return ValueReturns true if the principal is in the specified role; otherwise, false.
The principal is determined to be in the specified role if one or more of the IClaimsIdentity objects associated with it possesses a claim (Claim) with a value that matches the value specified by the role parameter and with the claim type that is configured as the role claim type for the identity through the IClaimsIdentity.RoleClaimType property.
Target PlatformsWindows 7, Windows Server 2008 R2, Windows Vista SP2, Windows Server 2008 SP2, Windows Server 2003 SP2 (32-bit or 64-bit)
Copyright © 2008 by Microsoft Corporation. All rights reserved.