Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize

DeleteCredential function

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


NTSTATUS DeleteCredential(
  _In_ PLUID       LogonId,
  _In_ ULONG       AuthenticationPackage,
  _In_ PLSA_STRING PrimaryKeyValue
);

Parameters

LogonId [in]

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

AuthenticationPackage [in]

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

PrimaryKeyValue [in]

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 codeDescription
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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Ntsecpkg.h

See also

LSA_DISPATCH_TABLE
LSA_SECPKG_FUNCTION_TABLE

 

 

Community Additions

ADD
Show:
© 2015 Microsoft