Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Security.​Principal.​WindowsPrincipal

Assembly: System.Security.Principal.Windows

Inheritance: object → Claims.​ClaimsPrincipal → WindowsPrincipal

Implemented Interfaces

Enables code to check the Windows group membership of a Windows user.

Properties

Gets all Windows device claims from this principal.
public IIdentity
Identity
Gets the identity of the current principal.
Gets all Windows user claims from this principal.
protected byte[]
CustomSerializationData

Methods

public bool
IsInRole​(int rid)
Determines whether the current principal belongs to the Windows user group with the specified relative identifier (RID).
Returns <see langword="true" /> if the current principal is a member of the specified Windows user group, that is, in a particular role; otherwise, <see langword="false" /> .
rid The RID of the Windows user group in which to check for the principal's membership status.
public bool
IsInRole​(SecurityIdentifier sid)
Determines whether the current principal belongs to the Windows user group with the specified security identifier (SID).
Returns <see langword="true" /> if the current principal is a member of the specified Windows user group; otherwise, <see langword="false" /> .
sid A <see cref="T:System.Security.Principal.SecurityIdentifier" /> that uniquely identifies a Windows user group.
public bool
IsInRole​(WindowsBuiltInRole role)
Determines whether the current principal belongs to the Windows user group with the specified <see cref="T:System.Security.Principal.WindowsBuiltInRole" /> .
Returns <see langword="true" /> if the current principal is a member of the specified Windows user group; otherwise, <see langword="false" /> .
role One of the <see cref="T:System.Security.Principal.WindowsBuiltInRole" /> values.
public bool
IsInRole​(string role)
Determines whether the current principal belongs to the Windows user group with the specified name.
Returns <see langword="true" /> if the current principal is a member of the specified Windows user group; otherwise, <see langword="false" /> .
role The name of the Windows user group for which to check membership.
public void
AddIdentities​(Collections.​Generic.​IEnumerable<​Claims.​ClaimsIdentity> identities)
Inherited from Claims.​ClaimsPrincipal
public void
AddIdentity​(Claims.​ClaimsIdentity identity)
Inherited from Claims.​ClaimsPrincipal
Clone​()
Inherited from Claims.​ClaimsPrincipal
CreateClaimsIdentity​(IO.​BinaryReader reader)
Inherited from Claims.​ClaimsPrincipal
FindAll​(string type)
Inherited from Claims.​ClaimsPrincipal
FindFirst​(Predicate<​Claims.​Claim> match)
Inherited from Claims.​ClaimsPrincipal
FindFirst​(string type)
Inherited from Claims.​ClaimsPrincipal
public bool
HasClaim​(Predicate<​Claims.​Claim> match)
Inherited from Claims.​ClaimsPrincipal
public bool
HasClaim​(string type, string value)
Inherited from Claims.​ClaimsPrincipal
public void
WriteTo​(IO.​BinaryWriter writer)
Inherited from Claims.​ClaimsPrincipal
protected void
WriteTo​(IO.​BinaryWriter writer, byte[] userData)
Inherited from Claims.​ClaimsPrincipal
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object