TokenAccessLevels Enum
Specifies the access rights for an access token.
[Flags]
public enum TokenAccessLevelsRemarks
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
| Name | Value | Description |
|---|---|---|
AssignPrimary | 1 | Required to attach a primary token to a process. |
Duplicate | 2 | Required to duplicate an access token. |
Impersonate | 4 | Required to attach an impersonation access token to a process. |
Query | 8 | Required to query an access token. |
QuerySource | 16 | Required to query the source of an access token. |
AdjustPrivileges | 32 | Required to enable or disable the privileges in an access token. |
AdjustGroups | 64 | Required to adjust the attributes of the groups in an access token. |
AdjustDefault | 128 | Required to change the default owner, primary group, or DACL of an access token. |
AdjustSessionId | 256 | Required to adjust the session ID of an access token. |
Read | 131080 | Combines STANDARD_RIGHTS_READ and TokenAccessLevels.Query. |
Write | 131296 | Combines STANDARD_RIGHTS_WRITE with TokenAccessLevels.AdjustPrivileges, TokenAccessLevels.AdjustGroups, and TokenAccessLevels.AdjustDefault. |
AllAccess | 983551 | Combines all possible access rights for a token. |
MaximumAllowed | 33554432 | Requests the maximum access allowed for the caller. |