WindowsPrincipal.IsInRole Method

Determines whether the current principal belongs to a specified Windows user group.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method IsInRole(Int32) Determines whether the current principal belongs to the Windows user group with the specified relative identifier (RID).
Public method IsInRole(SecurityIdentifier) Determines whether the current principal belongs to the Windows user group with the specified security identifier (SID).
Public method IsInRole(String) Determines whether the current principal belongs to the Windows user group with the specified name. (Overrides ClaimsPrincipal.IsInRole(String).)
Public method IsInRole(WindowsBuiltInRole) Determines whether the current principal belongs to the Windows user group with the specified WindowsBuiltInRole.
Top

There are four overloads for this method. For performance reasons, the IsInRole(SecurityIdentifier) overload is strongly recommended.

Important note Important

The IsInRole method is not supported on Windows 98 or Windows Millennium Edition.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft