SecPkgContext_AccessToken structure (sspi.h)

The SecPkgContext_AccessToken structure returns a handle to the access token for the current security context. The returned handle can be used by the ImpersonateLoggedOnUser and GetTokenInformation functions. This structure is returned by the QueryContextAttributes (General) function.

Syntax

typedef struct _SecPkgContext_AccessToken {
  void *AccessToken;
} SecPkgContext_AccessToken, *PSecPkgContext_AccessToken;

Members

AccessToken

Pointer to a void that receives the handle to the access token that represents the authenticated user.

The returned handle is not duplicated, so the calling process must not call CloseHandle on the returned handle.

If the security context is for a server or is incomplete, the returned handle may be NULL. Depending on the security package, QueryContextAttributes (General) may return SEC_E_NO_IMPERSONATION for these cases.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header sspi.h (include Security.h)