When moving your applications to the cloud, it makes sense to start using Azure Services to get the best service, highest availability (SLA) and worry free maintenance provided by Azure. The next step is to use Azure AD identities with Azure SQL Database.
Schematic overview of Azure SQL with AAD integration, and optionally synced from on-premise AD.
Within a few steps you will have Azure AD user authentication setup.
Continue reading “Azure SQL configure Azure AD user authentication (Manual)”
This simple manual has been created to create an user in Azure SQL and assign appropriate permissions. First connect to your SQL server. Either use and AAD admin account or the SQL Admin account.
Once connected, open a New Query window and run the following command on the Master database to create the user on the server in the Master database:
CREATE LOGIN '<Username>' WITH password='<strong-password>';
Now open again a New Query window, and select the database where you want to provision permissions to the just created user. Make sure to match the Username from the command above.
CREATE USER "<Username>";
The last step is to assign the desired role to the user. Change the value of the role, and match again the Username.
EXEC sp_addrolemember 'db_datawriter', '<Username';
This should do the trick. Let me know if you have any problems or need help.