Hi Kostiantyn Bezruchenkov •,
Welcome to Microsoft Q&A forum and thanks for using Azure Services.
As I understand, you are getting login error: The server principal "sasqlintegration" is not able to access the database "master" under the current security context. Cannot open database "master" requested by the login. The login failed.
Could you please try below:
-- in the master database we need to create LOGIN
create login [MyLogin] with password = 'DummyPassword'
-- in non-master database including the master database, we need to create a USER, so we will be able to use it by the LOGIN
-- This mean that in each database we add this the person will be able to connect, but still will have no permissions to do anything
-- Maybe USER is only created in the master database but a USER is a databases level entity
create user [MyUser] from login [MyLogin];
Now we are moving to the permissions which you want to give your LOGIN/User. Here are some options for example:
-- if you want the user to be able to create databases, then in the master database
exec sp_addRoleMember 'dbmanager', 'MyUser';
-- if you want the user to be able to create other LOGIN, then in the master database
exec sp_addRoleMember 'loginmanager', 'MyUser'
-- in each individual database, that you want to give the USER full control in the database level, grant him db_owner
exec sp_addRoleMember 'db_owner', 'MyUser';
Note! Give the USER only the permission that he need and nothing more! The above is only a sample of a few permissions. Use GRANT to give permissions on specific entities in the database and don't make each USER a database owner.
For more information you should check the following document:
https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage
Hope this helps. Please let us know if you are still facing issue so that we can further look into it.
If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.
Thank you.