{"id":2074,"date":"2023-01-15T22:58:18","date_gmt":"2023-01-15T22:58:18","guid":{"rendered":"https:\/\/www.theSQLReport.com\/?p=2074"},"modified":"2023-01-16T12:13:55","modified_gmt":"2023-01-16T12:13:55","slug":"error-18452-login-is-from-an-untrusted-domain-and-cannot-be-used-with-windows-authentication","status":"publish","type":"post","link":"https:\/\/www.theSQLReport.com\/?p=2074","title":{"rendered":"Error: 18452 &#8211; login is from an untrusted domain and cannot be used with Windows authentication"},"content":{"rendered":"<p><strong>Note:<\/strong><\/p>\n<p>This is just a work around &amp; not root cause.\u00a0 This does not work in all cases, and is environment dependent.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Problem:<\/strong><\/p>\n<p>Being in a new environment, sometime I will get the following error when I attempt to connect to SQL Server with Windows Authentication from my workstation using SQL Server Management Studio (SSMS).<\/p>\n<p><em>Error:<\/em><\/p>\n<h6>Cannot connect to &lt;hostname&gt;.<\/h6>\n<h6>Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. (Microsoft SQL Server, Error: 18452)<\/h6>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Error-18452.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2075 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Error-18452.jpg\" alt=\"\" width=\"809\" height=\"214\" \/><\/a><\/p>\n<p>This is odd because I am able to RDP on the server where my Active Directory login works with SSMS .\u00a0 Also, strange because most of the other SQL Servers in this domain do not have this issue.\u00a0 This is a challenge to troubleshoot with this being a very locked down environment, which I have limited visibility to the settings with the Windows Server operating system.\u00a0 However this SQL Server is configured for for Mixed-Mode authentication (so its not that issue).<\/p>\n<p><strong>Work Around:<\/strong><\/p>\n<p>When attempting to connect to SQL Server using SSMS with this problem with Windows Authentication, click on the Options button.<\/p>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Login_Options_Button.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2076 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Login_Options_Button.jpg\" alt=\"\" width=\"484\" height=\"322\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Login_Options_Button.jpg 484w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Login_Options_Button-300x200.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Login_Options_Button-210x140.jpg 210w\" sizes=\"(max-width: 484px) 100vw, 484px\" \/><\/a><\/p>\n<p>Then in the Connection Properties tab, click the check box for &#8220;Trust Server Certificate&#8221;, and then click on the Connect button.<\/p>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Login_ConnectionProperties_TrustServerCertificate.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2077 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Login_ConnectionProperties_TrustServerCertificate.jpg\" alt=\"\" width=\"479\" height=\"522\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Login_ConnectionProperties_TrustServerCertificate.jpg 479w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Login_ConnectionProperties_TrustServerCertificate-275x300.jpg 275w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2023\/01\/Login_ConnectionProperties_TrustServerCertificate-193x210.jpg 193w\" sizes=\"(max-width: 479px) 100vw, 479px\" \/><\/a><\/p>\n<p><strong>Side Note:<\/strong><\/p>\n<p>To help those applications with this issue, had to adjust the ODBC setting or ODBC string to add &#8220;TrustServerCertificate=True&#8221;.<\/p>\n<p>&nbsp;<\/p>\n<p>If I ever find root cause, I will update this post.\u00a0 If you have found root cause, please share in the comments below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: This is just a work around &amp; not root cause.\u00a0 This does not work in all cases, and is environment dependent. &nbsp; Problem: Being in a new environment, sometime &hellip; <a class=\"readmore\" href=\"https:\/\/www.theSQLReport.com\/?p=2074\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":2075,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[200,202,201],"class_list":["post-2074","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql-server","tag-error-18452","tag-untrusted-domain","tag-windows-authentication"],"_links":{"self":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/2074"}],"collection":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2074"}],"version-history":[{"count":5,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/2074\/revisions"}],"predecessor-version":[{"id":2081,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/2074\/revisions\/2081"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/media\/2075"}],"wp:attachment":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}