Hello,
The error you’re seeing Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication combined with SSPI handshake failed with error code 0x80090311 indicates that the SQL Server cannot establish a Kerberos/NTLM security context because the domain controller is unreachable or the trust relationship is broken. The specific OS error No authority could be contacted for authentication confirms that the client or server cannot reach a domain controller to validate the credentials.
This typically occurs in one of three scenarios. First, the SQL Server is joined to a domain but the client machine is not, or they are in different domains without a trust relationship. Second, the machine is domain‑joined but cannot contact a domain controller due to DNS misconfiguration, firewall rules, or replication issues. Third, the SPN (Service Principal Name) for SQL Server is missing or misregistered, which prevents Kerberos from completing the SSPI handshake.
To resolve it, start by confirming that both the SQL Server and the client are joined to the same domain or to trusted domains. Run nltest /dsgetdc:<domain> from both sides to verify that they can locate a domain controller. Check DNS resolution: the SQL Server must resolve the domain controllers via its configured DNS servers, not external DNS. If you see failures, adjust the DNS settings to point to your AD DNS.
If domain connectivity is fine, check the SPNs. Use setspn -L <SQLServiceAccount> to list the SPNs registered for the SQL Server service account. For Kerberos to work, you need entries like MSSQLSvc/<hostname>:1433 and MSSQLSvc/<FQDN>:1433. If they are missing, register them with setspn -A. Without valid SPNs, Kerberos fails and the SSPI handshake error appears.
If you cannot guarantee domain connectivity, switch the connection string to use SQL authentication instead of Integrated Security. That bypasses SSPI entirely. But if you require Integrated Security, you must fix the domain trust and SPN registration.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
Domic Vo.