WindowsIdentity
Represents a Windows user.
Identifies the name of the default ClaimsIdentity issuer.
Gets this SafeAccessTokenHandle for this WindowsIdentity instance.
Gets claims that have the WindowsDeviceClaim property key.
Gets the groups the current Windows user belongs to.
Gets the impersonation level for the user.
Gets a value that indicates whether the user account is identified as an anonymous account by the system.
Gets a value indicating whether the user account is identified as a Guest account by the system.
Gets a value indicating whether the user account is identified as a System account by the system.
Gets the security identifier (SID) for the token owner.
Gets the Windows account token for the user.
Gets the security identifier (SID) for the user.
Gets claims that have the WindowsUserClaim property key.
Initializes a new instance of the WindowsIdentity class for the user represented by the specified Windows account token.
Initializes a new instance of the WindowsIdentity class for the user represented by the specified Windows account token and the specified authentication type.
Initializes a new instance of the WindowsIdentity class for the user represented by the specified Windows account token, the specified authentication type, and the specified Windows account type.
public WindowsIdentity(IntPtr userToken, string type, WindowsAccountType acctType, bool isAuthenticated)
Initializes a new instance of the WindowsIdentity class for the user represented by the specified Windows account token, the specified authentication type, the specified Windows account type, and the specified authentication status.
Initializes a new instance of the WindowsIdentity class for the user represented by information in a SerializationInfo stream.
Initializes a new instance of the WindowsIdentity class by using the specified WindowsIdentity object.
Initializes a new instance of the WindowsIdentity class for the user represented by the specified User Principal Name (UPN).
Returns a WindowsIdentity object that you can use as a sentinel value in your code to represent an anonymous user. The property value does not represent the built-in anonymous identity used by the Windows operating system.
Returns a WindowsIdentity object that represents the current Windows user.
Returns a WindowsIdentity object that represents the Windows identity for either the thread or the process, depending on the value of the ifImpersonating parameter.
Returns a WindowsIdentity object that represents the current Windows user, using the specified desired token access level.
Runs the specified action as the impersonated Windows identity. Instead of using an impersonated method call and running your function in WindowsImpersonationContext, you can use RunImpersonated and provide your function directly as a parameter.
Runs the specified function as the impersonated Windows identity. Instead of using an impersonated method call and running your function in WindowsImpersonationContext, you can use RunImpersonated and provide your function directly as a parameter.
Releases all resources used by the WindowsIdentity.
Releases the unmanaged resources used by the WindowsIdentity and optionally releases the managed resources.