TokenInformationClass Enumeration

Specifies the type of information being assigned to or retrieved from an access token.

The GetTokenInformation(IntPtr, TokenInformationClass, IntPtr, Int32, Int32) function uses these values to indicate the type of token information to retrieve.

Definition

Namespace: DevCase.Win32.Enums
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public enum TokenInformationClass

Remarks

Members

TokenUser 1 The buffer receives a TOKEN_USER structure that contains the user account of the token.
TokenGroups 2 The buffer receives a TOKEN_GROUPS structure that contains the group accounts associated with the token.
TokenPrivileges 3 The buffer receives a TokenPrivileges structure that contains the privileges of the token.
TokenOwner 4 The buffer receives a TOKEN_OWNER structure that contains the default owner security identifier (SID) for newly created objects.
TokenPrimaryGroup 5 The buffer receives a TOKEN_PRIMARY_GROUP structure that contains the default primary group SID for newly created objects.
TokenDefaultDacl 6 The buffer receives a TOKEN_DEFAULT_DACL structure that contains the default DACL for newly created objects.
TokenSource 7 The buffer receives a TOKEN_SOURCE structure that contains the source of the token.

QuerySource access is needed to retrieve this information.

TokenType 8 The buffer receives a TOKEN_TYPE value that indicates whether the token is a primary or impersonation token.
TokenImpersonationLevel 9 The buffer receives a SecurityImpersonationLevel value that indicates the impersonation level of the token.

If the access token is not an impersonation token, the function fails.

TokenStatistics 10 The buffer receives a TOKEN_STATISTICS structure that contains various token statistics.
TokenRestrictedSids 11 The buffer receives a TOKEN_GROUPS structure that contains the list of restricting SIDs in a restricted token.
TokenSessionId 12 The buffer receives a DWORD value that indicates the Terminal Services session identifier that is associated with the token.
TokenGroupsAndPrivileges 13 The buffer receives a TOKEN_GROUPS_AND_PRIVILEGES structure that contains the user SID, the group accounts, the restricted SIDs, and the authentication ID associated with the token.
TokenSessionReference 14 Reserved.
TokenSandBoxInert 15 The buffer receives a DWORD value that is nonzero if the token includes the SANDBOX_INERT flag.
TokenAuditPolicy 16 Reserved.
TokenOrigin 17 The buffer receives a TOKEN_ORIGIN value.
TokenElevationType 18 The buffer receives a TOKEN_ELEVATION_TYPE value that specifies the elevation level of the token.
TokenLinkedToken 19 The buffer receives a TOKEN_LINKED_TOKEN structure that contains a handle to another token that is linked to this token.
TokenElevation 20 The buffer receives a TOKEN_ELEVATION structure that specifies whether the token is elevated.
TokenHasRestrictions 21 The buffer receives a DWORD value that is nonzero if the token has ever been filtered.
TokenAccessInformation 22 The buffer receives a TOKEN_ACCESS_INFORMATION structure that specifies security information contained in the token.
TokenVirtualizationAllowed 23 The buffer receives a DWORD value that is nonzero if virtualization is allowed for the token.
TokenVirtualizationEnabled 24 The buffer receives a DWORD value that is nonzero if virtualization is enabled for the token.
TokenIntegrityLevel 25 The buffer receives a TOKEN_MANDATORY_LABEL structure that specifies the token's integrity level.
TokenUIAccess 26 The buffer receives a DWORD value that is nonzero if the token has the UIAccess flag set.
TokenMandatoryPolicy 27 The buffer receives a TOKEN_MANDATORY_POLICY structure that specifies the token's mandatory integrity policy.
TokenLogonSid 28 The buffer receives the token's logon security identifier (SID).
TokenIsAppContainer 29 The buffer receives a DWORD value that is nonzero if the token is an app container token.

Any callers who check the TokenIsAppContainer and have it return 0 should also verify that the caller token is not an identify level impersonation token.

If the current token is not an app container but is an identity level token, you should return AccessDenied.

TokenCapabilities 30 The buffer receives a TOKEN_GROUPS structure that contains the capabilities associated with the token.
TokenAppContainerSid 31 The buffer receives a TOKEN_APPCONTAINER_INFORMATION structure that contains the AppContainerSid associated with the token.

If the token is not associated with an app container, the TokenAppContainer member of the TOKEN_APPCONTAINER_INFORMATION structure points to

TokenAppContainerNumber 32 The buffer receives a DWORD value that includes the app container number for the token.

For tokens that are not app container tokens, this value is 0.

TokenUserClaimAttributes 33 The buffer receives a CLAIM_SECURITY_ATTRIBUTES_INFORMATION structure that contains the user claims associated with the token.
TokenDeviceClaimAttributes 34 The buffer receives a CLAIM_SECURITY_ATTRIBUTES_INFORMATION structure that contains the device claims associated with the token.
TokenRestrictedUserClaimAttributes 35 This value is reserved.
TokenRestrictedDeviceClaimAttributes 36 This value is reserved.
TokenDeviceGroups 37 The buffer receives a TOKEN_GROUPS structure that contains the device groups that are associated with the token
TokenRestrictedDeviceGroups 38 The buffer receives a TOKEN_GROUPS structure that contains the restricted device groups that are associated with the token.
TokenSecurityAttributes 39 This value is reserved.
TokenIsRestricted 40 This value is reserved.
MaxTokenInfoClass 41 The maximum value for this enumeration.

See Also