TokenAccessLevels Enum

Specifies the access rights for an access token.

[Flags]
public enum TokenAccessLevels

Remarks

These flags specify the operations that can be performed on an access token. They are used when opening a token with AccessToken.OpenCurrentProcessToken or AccessToken.OpenProcessToken.

Fields

NameValueDescription
AssignPrimary1Required to attach a primary token to a process.
Duplicate2Required to duplicate an access token.
Impersonate4Required to attach an impersonation access token to a process.
Query8Required to query an access token.
QuerySource16Required to query the source of an access token.
AdjustPrivileges32Required to enable or disable the privileges in an access token.
AdjustGroups64Required to adjust the attributes of the groups in an access token.
AdjustDefault128Required to change the default owner, primary group, or DACL of an access token.
AdjustSessionId256Required to adjust the session ID of an access token.
Read131080Combines STANDARD_RIGHTS_READ and TokenAccessLevels.Query.
Write131296Combines STANDARD_RIGHTS_WRITE with TokenAccessLevels.AdjustPrivileges, TokenAccessLevels.AdjustGroups, and TokenAccessLevels.AdjustDefault.
AllAccess983551Combines all possible access rights for a token.
MaximumAllowed33554432Requests the maximum access allowed for the caller.