The TOKEN_INFORMATION_CLASS enumeration type contains values that specify the type of information being assigned to or retrieved from an access token.
The GetTokenInformation function uses these values to indicate the type of token information to retrieve.
The SetTokenInformation function uses these values to set the token information.
typedef enum _TOKEN_INFORMATION_CLASS { TokenUser = 1, TokenGroups, TokenPrivileges, TokenOwner, TokenPrimaryGroup, TokenDefaultDacl, TokenSource, TokenType, TokenImpersonationLevel, TokenStatistics, TokenRestrictedSids, TokenSessionId, TokenGroupsAndPrivileges, TokenSessionReference, TokenSandBoxInert, TokenAuditPolicy, TokenOrigin, TokenElevationType, TokenLinkedToken, TokenElevation, TokenHasRestrictions, TokenAccessInformation, TokenVirtualizationAllowed, TokenVirtualizationEnabled, TokenIntegrityLevel, TokenUIAccess, TokenMandatoryPolicy, TokenLogonSid, MaxTokenInfoClass } TOKEN_INFORMATION_CLASS, *PTOKEN_INFORMATION_CLASS;
The buffer receives a TOKEN_USER structure that contains the user account of the token.
The buffer receives a TOKEN_GROUPS structure that contains the group accounts associated with the token.
The buffer receives a TOKEN_PRIVILEGES structure that contains the privileges of the token.
The buffer receives a TOKEN_OWNER structure that contains the default owner security identifier (SID) for newly created objects.
The buffer receives a TOKEN_PRIMARY_GROUP structure that contains the default primary group SID for newly created objects.
The buffer receives a TOKEN_DEFAULT_DACL structure that contains the default DACL for newly created objects.
The buffer receives a TOKEN_SOURCE structure that contains the source of the token. TOKEN_QUERY_SOURCE access is needed to retrieve this information.
The buffer receives a TOKEN_TYPE value that indicates whether the token is a primary or impersonation token.
The buffer receives a SECURITY_IMPERSONATION_LEVEL value that indicates the impersonation level of the token. If the access token is not an impersonation token, the function fails.
The buffer receives a TOKEN_STATISTICS structure that contains various token statistics.
The buffer receives a TOKEN_GROUPS structure that contains the list of restricting SIDs in a restricted token.
The buffer receives a DWORD value that indicates the Terminal Services session identifier that is associated with the token.
Windows Server 2003, Windows XP, and Windows 2000: If the token is associated with the terminal server console session, the session identifier is zero.
In a non-Terminal Services environment, the session identifier is zero.
If TokenSessionId is set with SetTokenInformation, the application must have the Act As Part Of the Operating System privilege, and the application must be enabled to set the session ID in a token.
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.
Reserved.
The buffer receives a DWORD value that is nonzero if the token includes the SANDBOX_INERT flag.
The buffer receives a TOKEN_ORIGIN value.
If the token resulted from a logon that used explicit credentials, such as passing a name, domain, and password to the LogonUser function, then the TOKEN_ORIGIN structure will contain the ID of the logon session that created it.
If the token resulted from network authentication, such as a call to AcceptSecurityContext or a call to LogonUser with dwLogonType set to LOGON32_LOGON_NETWORK or LOGON32_LOGON_NETWORK_CLEARTEXT, then this value will be zero.
Windows XP/2000: This value is not supported.
The buffer receives a TOKEN_ELEVATION_TYPE value that specifies the elevation level of the token.
The buffer receives a TOKEN_LINKED_TOKEN structure that contains a handle to another token that is linked to this token.
The buffer receives a TOKEN_ELEVATION structure that specifies whether the token is elevated.
The buffer receives a DWORD value that is nonzero if the token has ever been filtered.
The buffer receives a TOKEN_ACCESS_INFORMATION structure that specifies security information contained in the token.
The buffer receives a DWORD value that is nonzero if virtualization is allowed for the token.
The buffer receives a DWORD value that is nonzero if virtualization is enabled for the token.
The buffer receives a TOKEN_MANDATORY_LABEL structure that specifies the token's integrity level.
The buffer receives a DWORD value that is nonzero if the token has the UIAccess flag set.
The buffer receives a TOKEN_MANDATORY_POLICY structure that specifies the token's mandatory integrity policy.
The buffer receives the token's logon security identifier (SID).
The maximum value for this enumeration
Send comments about this topic to Microsoft
Build date: 9/11/2009