3

Current Environment: I have been given Reader and SQL DB Contributor access to a resource group in Azure which has all the Azure SQL databases and the related Azure SQL server. I have 10 databases under the same server and within the same resource group.

Problem: When I try to connect to this server via SSMS using "Azure Active Directory - Password" I can not connect and get the "Login failed for user NT Authority\Anonymous Logon" error with error code 18456. But when I provide the database name in the connection properties in the login window of SSMS I can connect but now I can only view one database.

Question: I am trying to find out what's the reason for this behavior? As I have "SQL DB Contributor" access, shouldn't I be able to connect to the server and view all databases? Is "SQL Server Contributor" a requirement to connect to Azure SQL Server without specifying a Database name?

1
  • what's your SSMS version? Commented Apr 9, 2020 at 10:55

1 Answer 1

0

To connect to the server and view all your databases on SQL Server Management Studio you need to connect to the master database on that server and it will show you all databases listed on SSMS Object Explorer. If you connect to a user database SSMS won't show you the rest of the databases.

Get connected to the master database using the server Admin account.

If you are using an Azure Active Directory account make sure you add the the account as Azure SQL Administrator as shown here.

Sign up to request clarification or add additional context in comments.

2 Comments

The main issue was that I didn't have appropriate access to the databases. I did try your approach and it didn't work. I followed up with infra team and requested dbmanager access on the relevant databases and after that, i was able to connect and view all the databases without performing any additional steps. I am upvoting your answer as it definitely helped.
Thank you @NavneetSharma

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.