I'm trying to deploy an application to Azure using App Services and a Azure SQL database. We want users to log in with their e-mail address, such as user@company.com and john@doe.com both on the same application / database. The user id in IAM is an e-mail address and the users in the SQL database are also.
Only when trying to log in, the login with the e-mail address user@company.com fails:
Cannot open server “company.com” requested by the login. The login failed.
When I add the database server address to the e-mail address (user@company.com@my-database.database.windows.net), then the login succeeds.
How can I fix this that the user doesn't have to add the database server address?
Please note, when connecting with this user via SQL Server Studio Management Tools it also requires the postfix of the database server address in the user name, despite the fact that the user / login in the database is only iuser@company.com].