A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
Hello @Nick
The error "request_cannot_be_made" and "Token request cannot be made without authorization code or refresh token" is an authentication/token acquisition error. Since you've already removed the accessTokenCache and the problem persists, this may not simply be a stale cached account.
However, there's an important consideration here: Azure Data Studio was retired on February 28, 2026, and is no longer supported or receiving security/maintenance updates. Microsoft now recommends migrating to Visual Studio Code with the MSSQL extension for SQL Server and Azure SQL work.
Because of that, rather than continuing to troubleshoot the Azure Data Studio authentication flow, first try the supported replacement:
- Install Visual Studio Code.
- Install Microsoft's MSSQL extension.
- Add/connect to your SQL Server or Azure SQL instance from the MSSQL Connections view.
- Authenticate with the Azure account that currently has access to your Azure subscription.
You can use existing Azure Data Studio queries, scripts, and SQL database projects in Visual Studio Code without conversion.
If your immediate requirement is simply to add your current client IP to an Azure SQL Database firewall, you can also do that directly from the Azure portal rather than through Azure Data Studio.
Go to the Azure SQL logical server containing the database and open:
Networking > Public access > Firewall rules
Add your current client IPv4 address and save the configuration. You can then connect to the database using a supported SQL client.
One other thing I'd verify is whether the account you're using now belongs to the same Microsoft Entra tenant/directory and subscription as the SQL server. You mentioned that the Azure accounts previously stored in ADS were deleted. If the current account belongs to a different tenant, successful Microsoft authentication alone won't necessarily give it access to the Azure SQL resource.
If authentication also fails in Visual Studio Code/MSSQL, then the problem deserves further investigation as an Entra/MSAL authentication issue. But if VS Code signs in successfully, that strongly suggests you're encountering a problem with the retired Azure Data Studio authentication stack rather than the Azure account itself.
References:
What's happening with Azure Data Studio
Transition from Azure Data Studio
Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.