SSMS connection to AzureSQL database - ADAL error after not using for an hour or so

Luis 166 Reputation points
2022-11-16T16:09:51.617+00:00

@ADALTeam I have setup "Azure Active Directory - Integrated" on my azure development account. I have found that it stops working after not using it, even for short periods of time, less than
one hour, then I get the ADAL error as described on this post: ssms-connection-to-azuresql-database-adal-error.html

261062-image.png

I've been able to have it work again by just going to the Azure portal and open the one user and group I have setup, I followed the suggestions on the above post, and these are the results

1 - I have the latest ODBC driver installed, ODBC Driver 18 for SQL Server
2 - tnc login.windows.net -port 443 works
3 - tnc login.microsoftonline.net -port 443 doesn't work

I was able to sign in early today and most of the day yesterday, but now it is just not working as you can see in the picture below.

260940-image.png

Azure SQL Database
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 35,401 Reputation points MVP Volunteer Moderator
    2022-11-16T23:19:34.07+00:00

    On that same forum thread, you shared with us there is a deleted note you may not be able to see that @Oury Ba-MSFT shared with the Community. I am sharing it with you in case it helps:

    One customer who reported the same issue was able to get this resolve by recreating the account in the master DB.
    Anyone facing this type of issue can try this workaround to see of that resolve the problem.


  2. Oury Ba-MSFT 21,121 Reputation points Microsoft Employee Moderator
    2022-11-17T16:59:55.17+00:00

    Hi @Luis Thank you for your query and sorry to hear that you are facing ADAL issue connecting to Azure SQL DB using Azure Active directory Integrated.
    As mentioned above by @Alberto Morillo a customer was able to resolve his issue by recreating the account in the master DB, but your issue might be related to something else.

    Set the connection timeout < 20 and see if that solves the issue.

    If not check the followings:

    1. Connect with AAD integrated auth from another computer?
    2. Have all conditional access policies been removed that could affect both the user account and the computer account?

    Regards,
    Oury


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.