This is very interesting case which I came across and was not sure why login is failing even though password is correct.
So we had SQL Azure server “abcxyz123.database.windows.net” which has user firstname.lastname@example.org as administrator with password “abc123”
So when we try to login to this server from SSMS or if we click on manage on portal and give below credentials it gives error that login failed for user “xyz”
User Name: email@example.com
TITLE: Connect to Server
Cannot connect to abcxyz123.database.windows.net.
Login failed for user ‘xyz'.
This session has been assigned a tracing ID of 'd9c21eee-135c-4c08-86ab-1975bd4c607e'. Provide this tracing ID to customer support when you need assistance. (Microsoft SQL Server, Error: 18456)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
I looked into all possible logs to find out why it is not taking password even though it is correct but did not find anything interesting.
Later I realized that user name that it is using is “xyz” and not firstname.lastname@example.org
SO it is breaking username as soon as it finds “@”
We worked on this at our and end fixed this issue but with small catch.
Now you have to use email@example.com@abcxyz123 (basically username@servername) to connect instead of firstname.lastname@example.org
Now it breaks at last “@” sign and not first “@” sign.
So even now if we use just email@example.com it will break at last “@” and will consider “xyz” as user name so we have to use firstname.lastname@example.org@abcxyz123 as user name.
I Hope this helps to few such people who has “@” sign in their user name and struggling to understand why login is not happening.
Feel free to drop you questions in comments.