LSA_CREATE_LOGON_SESSION callback function (ntsecpkg.h)

Creates logon sessions.

The logon session is identified by a unique logon ID ( LUID) assigned to the logon session.

Syntax

LSA_CREATE_LOGON_SESSION LsaCreateLogonSession;

NTSTATUS LsaCreateLogonSession(
  [in] PLUID LogonId
)
{...}

Parameters

[in] LogonId

Pointer to an LUID structure to be assigned to the new logon session. An authentication package calls AllocateLocallyUniqueId in order to generate this ID.

Return value

If the function succeeds, the return value is STATUS_SUCCESS.

If the function fails, the return value is an NTSTATUS code, which can be the following value or one of the LSA Policy Function Return Values.

Return code Description
STATUS_LOGON_SESSION_COLLISION
The specified logon ID is already in use by another logon session.
 

The LsaNtStatusToWinError function converts an NTSTATUS code to a Windows error code.

Remarks

If an authentication package creates extraneous logon sessions while determining whether to authenticate the user, it should delete them by calling DeleteLogonSession. If the authentication fails, the authentication package should delete all related logon sessions.

Because logon sessions use memory in the kernel, it is important to delete any unused or discarded logon sessions.

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

DeleteLogonSession

LSA_DISPATCH_TABLE

LSA_SECPKG_FUNCTION_TABLE