LSA_DELETE_CREDENTIAL callback function (ntsecpkg.h)

Deletes an existing credential.

This function deletes the first credential it finds with a matching logon session ID, authentication package ID, and primary lookup key value. If there are multiple matching credentials, only one of them is deleted.

This function is not used by newer authentication packages, such as Kerberos.

Syntax

LSA_DELETE_CREDENTIAL LsaDeleteCredential;

NTSTATUS LsaDeleteCredential(
  [in] PLUID LogonId,
  [in] ULONG AuthenticationPackage,
  [in] PLSA_STRING PrimaryKeyValue
)
{...}

Parameters

[in] LogonId

Pointer to an LUID structure containing the session ID of the logon session from which the credential is to be deleted.

[in] AuthenticationPackage

Authentication package ID of the calling authentication package received in the LsaApInitializePackage call during DLL initialization.

[in] PrimaryKeyValue

Contains the primary lookup key of the credential to be deleted.

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 one of the following values or one of the LSA Policy Function Return Values.

Return code Description
ERROR_GEN_FAILURE
No matching credential could be found.
STATUS_NO_SUCH_LOGON_SESSION
The specified logon session could not be found.
 

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

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

LSA_DISPATCH_TABLE

LSA_SECPKG_FUNCTION_TABLE