<PackageReference Include="System.Security.Principal.Windows" Version="4.6.0" />

WindowsPrincipal

Enables code to check the Windows group membership of a Windows user.
public virtual IEnumerable<Claim> DeviceClaims { get; }

Gets all Windows device claims from this principal.

public virtual IEnumerable<Claim> UserClaims { get; }

Gets all Windows user claims from this principal.

public WindowsPrincipal(WindowsIdentity ntIdentity)

Initializes a new instance of the WindowsPrincipal class by using the specified WindowsIdentity object.

public virtual bool IsInRole(int rid)

Determines whether the current principal belongs to the Windows user group with the specified relative identifier (RID).

public virtual bool IsInRole(SecurityIdentifier sid)

Determines whether the current principal belongs to the Windows user group with the specified security identifier (SID).

public virtual bool IsInRole(WindowsBuiltInRole role)

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