DsSetAuthIdentity function

[This function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Beginning with Windows Vista, use Volume Shadow Copy Service (VSS) instead.]

The DsSetAuthIdentity function sets the security context under which the directory backup APIs are called.

Syntax

HRESULT DsSetAuthIdentity(
  _In_ LPCTSTR szUserName,
  _In_ LPCTSTR szDomainName,
  _In_ LPCTSTR szPassword
);

Parameters

szUserName [in]

The null-terminated string that specifies the user name.

szDomainName [in]

The null-terminated string that specifies the name of the domain that the user belongs to.

szPassword [in]

The null-terminated string that specifies the password of the user in the specified domain.

Return value

If successful, returns a standard HRESULT success codes; otherwise, a failure code is returned.

Remarks

If DsSetAuthIdentity is not called, security context of the current process is assumed.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Ntdsbcli.h
Library
Ntdsbcli.lib
DLL
Ntdsbcli.dll
Unicode and ANSI names
DsSetAuthIdentityW (Unicode) and DsSetAuthIdentityA (ANSI)

See also

Backing Up and Restoring an Active Directory Server

Directory Backup Functions