Troubleshooting Azure Active Directory Integrated Authentication in Azure SQL

Published Aug 27 2021 09:39 AM 2,302 Views
Microsoft

Integrated authentication provides a secure and easy way to connect to Azure SQL Database and SQL Managed Instance. It leverages hybrid identities that coexist both on traditional Active Directory on-premises and in Azure Active Directory.

 

At the time of writing Azure SQL supports Azure Active Directory Integrated authentication with SQL Server Management Studio (SSMS) either by using credentials from a federated domain or via a managed domain that is configured for seamless single sign-on for pass-through and password hash authentication. More information here Configure Azure Active Directory authentication - Azure SQL Database & SQL Managed Instance & Azure ...

 

We recently worked on an interesting case where our customer was getting the error “Integrated Windows authentication supported only in federation flow” when trying to use AAD Integrated authentication with SSMS.

SSMS-error-integrated-flow.png

 

Recently they have migrated from using ADFS (Active Directory Federation Services) to SSSO for PTA (Seamless Single Sign-on for Pass-through Authentication). To troubleshoot the issue, we performed the following checks.

 

Validating setup for SSSO for PTA

 

  1. Ensure you are using the latest version of Azure AD Connect
  2. Validate the Azure AD Connect status with the Azure portal https://aad.portal.azure.com
  3. Verify the below features are enabled
    • Sync Status
    • Seamless single sign-on
    • Pass-through authentication

AAD-Connect-status.png

 

Testing Seamless single sign on works correctly using a web browser

 

Follow the steps here and navigate to https://myapps.microsoft.com Be sure to either clear the browser cache or use a new private browser session with any of the supported browsers in private mode.

If you successfully signed in without providing the password, you have tested that SSSO with PTA is working correctly.

 

Now the question is. Why the sign in is failing with SSMS?

For that we turned to grab a capture using Fiddler

 

Collecting a Fiddler trace

 

The following link has a set of instructions on how to go about setting up Fiddler classic to collect a trace. Troubleshooting problems related to Azure AD authentication with Azure SQL DB and DW - Microsoft Tec...

 

  1. Once Fiddler is ready, I recommend that you pre-filter the capture by process as to only capture traffic that is originating from SSMS. That would prevent capturing traffic that is unrelated to our troubleshooting.
  2. Clear the current session if there are any frames that were captured before setting the filter
  3. Reproduce the issue
  4. Stop the capture and save the file

When we reviewed the trace, we saw a few interesting things

Fiddler-frames.png

We can only see a call to login.windows.net which is one of the endpoints that helps us use Azure Active Directory authentication.

 

For SSSO for PTA we would expect to see subsequent calls to https://autologon.microsoftazuread-sso.com which were not present in the trace.

 

This Azure AD URL should be present in the Intranet zone settings, and it is rolled out by a group policy object in the on premises Active Directory.

 

A key part on the investigation was finding that the client version is 1.0.x.x as captured on the Request Headers. This indicates the client is using the legacy Active Directory Authentication Library (ADAL)

Fiddler-client-details.png

 

Why is SSMS using a legacy component?

 

The SSMS version on the developer machine was the latest one so we needed to understand how the application is loading this library. For that we turned to Process Monitor (thanks Mark Russinovich)

 

We found that SSMS queries a key in the registry to find what DLL to use to support the Azure Active Directory Integrated authentication.

 

Procmon.png

Using the below PowerShell cmdlets, we were able to find the location of the library on the filesystem

 

Set-Location -Path HKLM:
Get-ItemProperty -Path SOFTWARE\WOW6432Node\Microsoft\MSADALSQL | Select-Object -Property TargetDir

 

adalsql.png

 

Checking on the adalsql.dll details we confirmed this is the legacy library

adalsql-props.png

 

As SSMS is a 32 bit application it loads the DLL from the SysWOW64 location. If your application is 64 bit you may opt to check the registry key HKLM:\SOFTWARE\Microsoft\MSADALSQL 

 

A clean install of the most recent version of SSMS creates a different DLL with the most up to date library

adal.png

adal-props.png

 

In this case the developer machine ended up having up that registry location modified and pointing to the legacy client (adalsql.dll). As the newer DLL (adal.dll) was already installed on the system the end user simply made the change to use the adal.dll on the registry.

 

It is important to be aware of this situation. Installing older versions of software like SSMS, SSDT (SQL Server Data Tools), Visual Studio etc. may end up modifying the registry key and pointing to the legacy ADAL client.

 

Cheers!

 

 

4 Comments
%3CLINGO-SUB%20id%3D%22lingo-sub-2670162%22%20slang%3D%22en-US%22%3ETroubleshooting%20Azure%20Active%20Directory%20Integrated%20Authentication%20in%20Azure%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2670162%22%20slang%3D%22en-US%22%3E%3CP%3EIntegrated%20authentication%20provides%20a%20secure%20and%20easy%20way%20to%20connect%20to%20Azure%20SQL%20Database%20and%20SQL%20Managed%20Instance.%20It%20leverages%20hybrid%20identities%20that%20coexist%20both%20on%20traditional%20Active%20Directory%20on-premises%20and%20in%20Azure%20Active%20Directory.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAt%20the%20time%20of%20writing%20Azure%20SQL%20supports%20Azure%20Active%20Directory%20Integrated%20authentication%20with%20SQL%20Server%20Management%20Studio%20(SSMS)%20either%20by%20using%20credentials%20from%20a%20federated%20domain%20or%20via%20a%20managed%20domain%20that%20is%20configured%20for%20seamless%20single%20sign-on%20for%20pass-through%20and%20password%20hash%20authentication.%20More%20information%20here%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-sql%2Fdatabase%2Fauthentication-aad-configure%3Ftabs%3Dazure-powershell%23using-an-azure-ad-identity-to-connect-from-a-client-application%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EConfigure%20Azure%20Active%20Directory%20authentication%20-%20Azure%20SQL%20Database%20%26amp%3B%20SQL%20Managed%20Instance%20%26amp%3B%20Azure%20Synapse%20Analytics%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20recently%20worked%20on%20an%20interesting%20case%20where%20our%20customer%20was%20getting%20the%20error%20%3CSPAN%3E%E2%80%9CIntegrated%20Windows%20authentication%20supported%20only%20in%20federation%20flow%E2%80%9D%20%3C%2FSPAN%3Ewhen%20trying%20to%20use%20AAD%20Integrated%20authentication%20with%20SSMS.%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SSMS-error-integrated-flow.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304661i6057788B2E4622B3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22SSMS-error-integrated-flow.png%22%20alt%3D%22SSMS-error-integrated-flow.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERecently%20they%20have%20migrated%20from%20using%20ADFS%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fhybrid%2Fhow-to-connect-fed-management%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EActive%20Directory%20Federation%20Services%3C%2FA%3E)%20to%20SSSO%20for%20PTA%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fhybrid%2Fhow-to-connect-sso-quick-start%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESeamless%20Single%20Sign-on%20for%20Pass-through%20Authentication%3C%2FA%3E).%20To%20troubleshoot%20the%20issue%2C%20we%20performed%20the%20following%20checks.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-2118664785%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%20id%3D%22toc-hId-2120602104%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-311210322%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%20id%3D%22toc-hId-313147641%22%3EValidating%20setup%20for%20SSSO%20for%20PTA%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EEnsure%20you%20are%20using%20the%20latest%20version%20of%20Azure%20AD%20Connect%3C%2FLI%3E%0A%3CLI%3EValidate%20the%20Azure%20AD%20Connect%20status%20with%20the%20Azure%20portal%20%3CA%20href%3D%22https%3A%2F%2Faad.portal.azure.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Faad.portal.azure.com%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EVerify%20the%20below%20features%20are%20enabled%3CUL%3E%0A%3CLI%3ESync%20Status%3C%2FLI%3E%0A%3CLI%3ESeamless%20single%20sign-on%3C%2FLI%3E%0A%3CLI%3EPass-through%20authentication%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AAD-Connect-status.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304662iAE5BA7CE48FF38CC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22AAD-Connect-status.png%22%20alt%3D%22AAD-Connect-status.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1496244141%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%20id%3D%22toc-hId--1494306822%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-991268692%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%20id%3D%22toc-hId-993206011%22%3ETesting%20Seamless%20single%20sign%20on%20works%20correctly%20using%20a%20web%20browser%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFollow%20the%20steps%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fhybrid%2Fhow-to-connect-sso-quick-start%23step-4-test-the-feature%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E%20and%20navigate%20to%20%3CA%20href%3D%22https%3A%2F%2Fmyapps.microsoft.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmyapps.microsoft.com%3C%2FA%3E%20Be%20sure%20to%20either%20clear%20the%20browser%20cache%20or%20use%20a%20new%20private%20browser%20session%20with%20any%20of%20the%20supported%20browsers%20in%20private%20mode.%3C%2FP%3E%0A%3CP%3EIf%20you%20successfully%20signed%20in%20without%20providing%20the%20password%2C%20you%20have%20tested%20that%20SSSO%20with%20PTA%20is%20working%20correctly.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20the%20question%20is.%20Why%20the%20sign%20in%20is%20failing%20with%20SSMS%3F%3C%2FP%3E%0A%3CP%3EFor%20that%20we%20turned%20to%20grab%20a%20capture%20using%20Fiddler%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--816185771%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%20id%3D%22toc-hId--814248452%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-1671327062%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%20id%3D%22toc-hId-1673264381%22%3ECollecting%20a%20Fiddler%20trace%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20following%20link%20has%20a%20set%20of%20instructions%20on%20how%20to%20go%20about%20setting%20up%20Fiddler%20classic%20to%20collect%20a%20trace.%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Ftroubleshooting-problems-related-to-azure-ad-authentication-with%2Fba-p%2F1062991%22%20target%3D%22_blank%22%3ETroubleshooting%20problems%20related%20to%20Azure%20AD%20authentication%20with%20Azure%20SQL%20DB%20and%20DW%20-%20Microsoft%20Tech%20Community%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EOnce%20Fiddler%20is%20ready%2C%20I%20recommend%20that%20you%20pre-filter%20the%20capture%20by%20process%20as%20to%20only%20capture%20traffic%20that%20is%20originating%20from%20SSMS.%20That%20would%20prevent%20capturing%20traffic%20that%20is%20unrelated%20to%20our%20troubleshooting.%3C%2FLI%3E%0A%3CLI%3EClear%20the%20current%20session%20if%20there%20are%20any%20frames%20that%20were%20captured%20before%20setting%20the%20filter%3C%2FLI%3E%0A%3CLI%3EReproduce%20the%20issue%3C%2FLI%3E%0A%3CLI%3EStop%20the%20capture%20and%20save%20the%20file%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EWhen%20we%20reviewed%20the%20trace%2C%20we%20saw%20a%20few%20interesting%20things%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Fiddler-frames.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304663i53509B90F66A19DB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Fiddler-frames.png%22%20alt%3D%22Fiddler-frames.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%0A%3CP%3EWe%20can%20only%20see%20a%20call%20to%20login.windows.net%20which%20is%20one%20of%20the%20endpoints%20that%20helps%20us%20use%20Azure%20Active%20Directory%20authentication.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20SSSO%20for%20PTA%20we%20would%20expect%20to%20see%20subsequent%20calls%20to%20%3CA%20href%3D%22https%3A%2F%2Fautologon.microsoftazuread-sso.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fautologon.microsoftazuread-sso.com%3C%2FA%3E%20which%20were%20not%20present%20in%20the%20trace.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20Azure%20AD%20URL%20should%20be%20present%20in%20the%20Intranet%20zone%20settings%2C%20and%20it%20is%20rolled%20out%20by%20a%20group%20policy%20object%20in%20the%20on%20premises%20Active%20Directory.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20key%20part%20on%20the%20investigation%20was%20finding%20that%20the%20client%20version%20is%201.0.x.x%20as%20captured%20on%20the%20Request%20Headers.%20This%20indicates%20the%20client%20is%20using%20the%20legacy%20Active%20Directory%20Authentication%20Library%20(ADAL)%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Fiddler-client-details.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304665iEF354999BD8867F9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Fiddler-client-details.png%22%20alt%3D%22Fiddler-client-details.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--136127401%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%20id%3D%22toc-hId--134190082%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId--1943581864%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%20id%3D%22toc-hId--1941644545%22%3EWhy%20is%20SSMS%20using%20a%20legacy%20component%3F%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20SSMS%20version%20on%20the%20developer%20machine%20was%20the%20latest%20one%20so%20we%20needed%20to%20understand%20how%20the%20application%20is%20loading%20this%20library.%20For%20that%20we%20turned%20to%20Process%20Monitor%20(thanks%20Mark%20Russinovich)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20found%20that%20SSMS%20queries%20a%20key%20in%20the%20registry%20to%20find%20what%20DLL%20to%20use%20to%20support%20the%20Azure%20Active%20Directory%20Integrated%20authentication.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Procmon.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304759iEA08120228F35E67%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Procmon.png%22%20alt%3D%22Procmon.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%0A%3CP%3EUsing%20the%20below%20PowerShell%20cmdlets%2C%20we%20were%20able%20to%20find%20the%20location%20of%20the%20library%20on%20the%20filesystem%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ESet-Location%20-Path%20HKLM%3A%0AGet-ItemProperty%20-Path%20SOFTWARE%5CWOW6432Node%5CMicrosoft%5CMSADALSQL%20%7C%20Select-Object%20-Property%20TargetDir%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22adalsql.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304669i97C03B6D347E919D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22adalsql.png%22%20alt%3D%22adalsql.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EChecking%20on%20the%20adalsql.dll%20details%20we%20confirmed%20this%20is%20the%20legacy%20library%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22adalsql-props.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304670iD0A460B1314261FB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22adalsql-props.png%22%20alt%3D%22adalsql-props.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20SSMS%20is%20a%2032%20bit%20application%20it%20loads%20the%20DLL%20from%20the%20SysWOW64%20location.%20If%20your%20application%20is%2064%20bit%20you%20may%20opt%20to%20check%20the%20registry%20key%20HKLM%3A%5CSOFTWARE%5CMicrosoft%5CMSADALSQL%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20clean%20install%20of%20the%20most%20recent%20version%20of%20SSMS%20creates%20a%20different%20DLL%20with%20the%20most%20up%20to%20date%20library%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22adal.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304671i9C6F504FBC8FA0B3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22adal.png%22%20alt%3D%22adal.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22adal-props.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304672iDEF4C626D2BC3FB9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22adal-props.png%22%20alt%3D%22adal-props.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20case%20the%20developer%20machine%20ended%20up%20having%20up%20that%20registry%20location%20modified%20and%20pointing%20to%20the%20legacy%20client%20(adalsql.dll).%20As%20the%20newer%20DLL%20(adal.dll)%20was%20already%20installed%20on%20the%20system%20the%20end%20user%20simply%20made%20the%20change%20to%20use%20the%20adal.dll%20on%20the%20registry.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20is%20important%20to%20be%20aware%20of%20this%20situation.%20Installing%20older%20versions%20of%20software%20like%20SSMS%2C%20SSDT%20(SQL%20Server%20Data%20Tools)%2C%20Visual%20Studio%20etc.%20may%20end%20up%20modifying%20the%20registry%20key%20and%20pointing%20to%20the%20legacy%20ADAL%20client.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECheers!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2670162%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22SSMS-error-integrated-flow.png%22%20style%3D%22width%3A%20390px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304660i0532416363207BCD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22SSMS-error-integrated-flow.png%22%20alt%3D%22Troubleshooting%20Azure%20Active%20Directory%20Integrated%20authentication%20in%20Azure%20SQL%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ETroubleshooting%20Azure%20Active%20Directory%20Integrated%20authentication%20in%20Azure%20SQL%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2670162%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20SQL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20SQL%20Security%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2729131%22%20slang%3D%22en-US%22%3ERe%3A%20Troubleshooting%20Azure%20Active%20Directory%20Integrated%20Authentication%20in%20Azure%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2729131%22%20slang%3D%22en-US%22%3E%3CP%3EReally%20helpful%20Luis%20thanks%20!!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2729149%22%20slang%3D%22en-US%22%3ERe%3A%20Troubleshooting%20Azure%20Active%20Directory%20Integrated%20Authentication%20in%20Azure%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2729149%22%20slang%3D%22en-US%22%3E%3CP%3EThaks%20for%20the%20info%20%3B)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2923600%22%20slang%3D%22en-US%22%3ERe%3A%20Troubleshooting%20Azure%20Active%20Directory%20Integrated%20Authentication%20in%20Azure%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2923600%22%20slang%3D%22en-US%22%3E%3CP%3ELuis!%20You've%20saved%20me!%20We%20have%20had%20this%20exact%20same%20issue%20-%20we%20have%20a%20desktop%20application%20with%20a%20connection%20string%20that%20uses%20%22Active%20Directory%20Integrated%22%20as%20the%20authentication%20mechanism%2C%20which%20worked%20fine%20on%20a%20couple%20of%20our%20development%20machines%2C%20but%20suddenly%20stopped%20working%20on%20other%20machines%20as%20we%20were%20phasing%20users%20over%20to%20Azure%20AD.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20followed%20the%20steps%20you%20did%20and%20found%20the%20older%20version%20of%20adalsql.dll%20was%20being%20used%20on%20the%20machines%20where%20it%20was%20failing%2C%20but%20a%20newer%20version%20of%20adal.dll%20was%20being%20used%20on%20the%20development%20machines%20that%20weren't%20having%20any%20issues.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20were%20using%20this%20link%20to%20deploy%20(via%20GP)%20adalsql.msi%20to%20our%20user's%20machines%2C%20but%20this%20appears%20to%20be%20older%20(non-working)%20version%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D48742%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D48742%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnnoyingly%20I%20can't%20find%20a%20more%20recent%20version%20that%20we%20could%20deploy%20via%20GP%20that%20isn't%20bundled%20in%20SSMS%20or%20some%20other%20development%20tool.%20Do%20you%20know%20of%20anywhere%20something%20like%20that%20can%20be%20obtained%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2943254%22%20slang%3D%22en-US%22%3ERe%3A%20Troubleshooting%20Azure%20Active%20Directory%20Integrated%20Authentication%20in%20Azure%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2943254%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1206110%22%20target%3D%22_blank%22%3E%40NickMoores%3C%2FA%3E!%20Thanks%20for%20the%20feedback.%20Glad%20that%20it%20has%20been%20helpful.%20%3CBR%20%2F%3EFor%20your%20question%20installing%20the%20latest%20ODBC%20driver%20should%20be%20sufficient%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fconnect%2Fodbc%2Fdownload-odbc-driver-for-sql-server%3Fview%3Dsql-server-ver15%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EDownload%20ODBC%20Driver%20for%20SQL%20Server%20-%20ODBC%20Driver%20for%20SQL%20Server%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EI%20just%20tested%20in%20a%20vanilla%20Windows%20and%20by%20installing%20the%20most%20recent%20package%2C%20the%20latest%20version%20of%20ADAL%20is%20deployed.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Co-Authors
Version history
Last update:
‎Aug 23 2021 05:29 PM
Updated by: