Create custom user login for Azure SQL

Create custom user login for Azure SQL

First, you need to create a new login on the MASTER database using the following command

CREATE LOGIN NewDbUser WITH PASSWORD = ‘Passw0rd’ GO

Then you have to create a User on your database using a previously established login, and add permissions for the database using the following command

Important! Do not forget to switch database, it is NOT Master anymore

CREATE USER NewDbUser FOR LOGIN NewDbUser GO EXEC sp_addrolemember N‘db_owner’, N‘NewDbUser’ GO