Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

  NameDescription
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 that has the specified security identifier (SID).
Public method IsInRole(String) Determines whether the current principal belongs to the Windows user group that has the specified name.
Public method IsInRole(WindowsBuiltInRole) Determines whether the current principal belongs to the Windows user group that has the specified WindowsBuiltInRole.
Top

There are four overloads for this method. For performance reasons, we recommend that you use the IsInRole(SecurityIdentifier) overload.

Community Additions

Show:
© 2017 Microsoft