I have a problem and hope someone can help me. I have SQL Server as docker container. I want our developers able to login in SSMS (SQL Server Management Studio) using their Active Directory users. I followed this procedures which was Microsoft Doc page but it didn't work. The log file in container shows about error:

Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication. [CLIENT:]

Error: 17806, Severity: 20, State: 14.
SSPI handshake failed with error code 0x80090304, state 14 while establishing a connection with integrated security; the connection has been closed.
Reason: AcceptSecurityContext failed. The operating system error code indicates the cause of failure. The Local Security Authority cannot be contacted [CLIENT:]

My container run successfully and I can connect to it using sa user but, I can't login using Windows Authentication. This is my docker run command:

# docker run -itd -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<pass>" -p 1433:1433 --name msdb \
--user root \
-v /root/mssql:/var/opt/mssql/ \
-v /root/mssql/krb5.conf:/etc/krb5.conf \
--dns-search <full domain> \
--dns \
--add-host <dc.mydomain>: \
--add-host <mydomain>: \
--add-host <my domain.com>: mcr.microsoft.com/mssql/server

Also, I checked this checklists but the problem didn't resolve and I got the same error again.

I hope some one can help me how can I resolve it.


  • Is your client machine running SSMS joined to the domain? If not then are you using Runas to start SSMS so that it has domain context? Jan 31, 2021 at 22:21
  • Does the SQL error log have any entries regarding kerberos and the SPN? Can you post the lines from the log? Feb 1, 2021 at 9:46
  • I'd also try the debugging mentioned at bobsql.com/… Feb 1, 2021 at 9:49

1 Answer 1


@Martin Cairry, Yes, client is windows 10 and its joined the domain, ssms verion is 18.5. all users have domain admin privilege. Also when I login to ssms with sa user, I can add my domain user in login section but it can't login using windows authentication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.