LSA_OPEN_TOKEN_BY_LOGON_ID callback function (ntsecpkg.h)

Opens the user access token associated with the specified user logon.

Syntax

LSA_OPEN_TOKEN_BY_LOGON_ID LsaOpenTokenByLogonId;

NTSTATUS LsaOpenTokenByLogonId(
  [in]  PLUID LogonId,
  [out] HANDLE *RetTokenHandle
)
{...}

Parameters

[in] LogonId

A pointer to a LUID structure that identifies the user for which to open the access token.

[out] RetTokenHandle

A pointer to the handle to the token this function opens.

Return value

If the function succeeds, return STATUS_SUCCESS, or an informational status code.

If the function fails, return an NTSTATUS error code that indicates the reason it failed.

Remarks

A pointer to the OpenTokenByLogonId function is available in the LSA_SECPKG_FUNCTION_TABLE structure received by the SpInitialize function.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header ntsecpkg.h

See also

SpInitialize