<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0-rc.1.20451.14" />

System.Security.Principal.WindowsPrincipal

Enables code to check the Windows group membership of a Windows user.
namespace System.Security.Principal { public class WindowsPrincipal : ClaimsPrincipal { public virtual IEnumerable<Claim> DeviceClaims { get; } public virtual IEnumerable<Claim> UserClaims { get; } public WindowsPrincipal(WindowsIdentity ntIdentity); public virtual bool IsInRole(int rid); public virtual bool IsInRole(SecurityIdentifier sid); public virtual bool IsInRole(WindowsBuiltInRole role); } }