LsaLookupAuthenticationPackage function (ntsecapi.h)

The LsaLookupAuthenticationPackage function obtains the unique identifier of an authentication package.


NTSTATUS LsaLookupAuthenticationPackage(
  [in]  HANDLE      LsaHandle,
  [in]  PLSA_STRING PackageName,
  [out] PULONG      AuthenticationPackage


[in] LsaHandle

Handle obtained from a previous call to LsaRegisterLogonProcess or LsaConnectUntrusted.

[in] PackageName

Pointer to an LSA_STRING structure that specifies the name of the authentication package. The package name must not exceed 127 bytes in length. The following table lists the names of the Microsoft-provided authentication packages.

Value Meaning
ANSI version of the MSV1_0 authentication package name.
ANSI version of the Kerberos authentication package name.
ANSI version of the Negotiate authentication package name.

[out] AuthenticationPackage

Pointer to a ULONG that receives the authentication package identifier.

Return value

If the function succeeds, the return value is STATUS_SUCCESS.

If the function fails, the return value is an NTSTATUS code. The following are possible error codes.

Return code Description
The specified authentication package is unknown to the LSA.
The authentication package name exceeds 127 bytes.

For more information, see LSA Policy Function Return Values.

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


The authentication package identifier is used in calls to authentication functions such as LsaLogonUser and LsaCallAuthenticationPackage.


Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header ntsecapi.h
Library Secur32.lib
DLL Secur32.dll

See also