How to setup Linked Server connect with different Domain Account with Windows Authentication we have two SQL Server 2017 &quot;ServerA&quot; and &quot;ServerB&quot; on Windows Server 2016 in the same domain.
Both SQL Server have a Login defined &quot;mydomain\dbaccount&quot;.
On ServerA we have a Login defined &quot;mydomain\testaccount&quot; which can access the Database.
We want to connect with the &quot;mydomain\testaccount&quot; to ServerB via Linked Server. The linked server should connect with the &quot;mydomain\dbaccount&quot; via Windows Authentication.
We cannot provide password in linked server of &quot;mydomain\dbaccount&quot; as we want to connect via Windows Authentication. And the Login on ServerB is defined as Windows Authentication.
We tried to setup the Linked Server with the local login as &quot;mydomain\testaccount&quot; and impersonate=true and we are getting the following error:

The OLE DB provider &quot;SQLNCLI11&quot; for linked server &quot;ServerB&quot; reported
an error. Authentication failed. Cannot initialize the data source
object of OLE DB provider &quot;SQLNCLI11&quot; for linked server &quot;ServerB&quot;. OLE
DB provider &quot;SQLNCLI11&quot; for linked server &quot;ServerB&quot; returned message
&quot;Invalid authorization specification&quot;. (Microsoft SQL Server, Error:
7399)

We tried to setup the Linked Server with the local login as &quot;mydomain\testaccount&quot; and impersonate=false and remote user as &quot;mydomain\dbaccount&quot; and we are getting the following error:

Login failed for user 'mydomain\dbaccount'. (Microsoft SQL Server,
Error: 18456)

We tried to setup the Linked Server with the local login as &quot;mydomain\testaccount&quot; and impersonate=true and without remote user and in options we checked &quot;Be made using this security context&quot; and defined remote login as &quot;mydomain\dbaccount&quot; without password and we are getting the following error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. (Microsoft SQL
Server, Error: 18456)

How can we setup Linked Server with remote Windows Authentication?
No can do, I'm afraid. For a local Win login, you can point to a remote SQL login (including the password), or you can ask for impersonation/delegation meaning that the same win account/login will be used on the other SQL Server.
You can't point to a different win account/login on the remote server,