"Login failed for user" when using admin user in SSMS I am trying to connect to an Azure SQL database via SSMS. The connection string supplied by Azure is:


  Server=tcp:SERVER_NAME.database.windows.net,1433;Initial Catalog=DATABASE_NAME;Persist Security Info=False;User ID={your_username};Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;


So, first of all I'm not sure if I should include ALL of

tcp:SERVER_NAME.database.windows.net,1433


in the server name when connecting via SSMS.   Also, the username is an email address.  Let's say it's:

foo@bar.com


So, this is what I tried:

ServerName: SERVER_NAME.database.windows.net
Login:      foo@bar.com@SERVER_NAME.database.windows.net
Password:   [password]


At first when I tried, I was told that the IP was not allowed.  So I added the IP to the server firewall settings.  But now, I get this:


  Login failed for user foo@bar.com


I am using the same UserID and Password that I use to log into the Azure portal.  And it's the UserID that is specified in the Access Control window.

I am working from home, but I have also tried while on my company's VPN.  Neither work.

Is there something else I'm doing wrong?
Pretty sure the problem is in the username. When you connect to an Azure SQL Database instance, foo@bar implies that you're connecting as the login "foo" to the instance "bar.database.windows.net".

The credentials you use when logging into the Azure management portal won't work when you're using SSMS.

Verify that you've set up a SQL Database login, and use that login. The admin account is set up in the Azure portal - you can verify the login name by clicking "Properties" on the server instance.

Regular logins/users are set up as 1) logins on the database server, or 2) as contained users in each database (if you have enabled containment), or 3) in Active Directory (if you've configured one).