LsaLookupAuthenticationPackage function

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

Syntax

NTSTATUS LsaLookupAuthenticationPackage(
  HANDLE      LsaHandle,
  PLSA_STRING PackageName,
  PULONG      AuthenticationPackage
);

Parameters

LsaHandle

Handle obtained from a previous call to LsaRegisterLogonProcess or LsaConnectUntrusted.

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
MSV1_0_PACKAGE_NAME
ANSI version of the MSV1_0 authentication package name.
MICROSOFT_KERBEROS_NAME_A
ANSI version of the Kerberos authentication package name.
NEGOSSP_NAME_A
ANSI version of the Negotiate authentication package name.

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
STATUS_NO_SUCH_PACKAGE
The specified authentication package is unknown to the LSA.
STATUS_NAME_TOO_LONG
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.

Remarks

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

Requirements

   
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

LsaCallAuthenticationPackage

LsaLogonUser