Establishing connection to Azure SQL server. "Error: Token retrieval failed with an error. Open developer tools to view the error"?

Viewed 4305

Using Azure Data Studio:

Version: 1.32.0 (system setup) Commit: 4a45ba7cf20dd4129f1a08e5e776dfb33e3d1d1e Date: 2021-08-16T18:08:28.086Z VS Code: 1.56.0 Electron: 12.0.7 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Windows_NT x64 10.0.17763

I am attempting to access a database that I have read/write permissions to. I have accessed it regularly. Now, I am getting the error: Token retrieval failed with an error. Open developer tools to view the error

Following is the connection details window: image of connection details window

Connection type: Microsoft SQL Server

Authentication type: Azure Active Directory - Universal with MFA support

The server, account, and database fields are all populated with their respective necessary information.

A browser window pops up asking for username/password, which I enter valid credentials for, followed by the authentication being confirmed in the browser that follows, accompanied by instructions to close the browser window. Azure Data Studio then has the error displayed mentioned above: Token retrieval failed with an error. Open developer tools to view the error

Why the difference in expected credentials?

1 Answers

Problem seems to be with a cached token. try to delete the token from here C:\Users{UserNameHere}\AppData\Roaming\azuredatastudio\Azure Accounts and try to re authenticate.

Related