How do I add additional active directory logins to an Azure database?
How do I add additional active directory logins to an Azure database?
I have been able to set up an active directory login for my Azure database.
Now I want to add additional active directory logins and set their permissions
I understand that I need to use Management Studio to do this and have installed SSMS v17.8.1
I have been studying docs but I can't find the instructions
[Update]
After reading Conor's answer I was able to create the user
CREATE USER [jobuser@mydomain] FROM EXTERNAL PROVIDER WITH DEFAULT_SCHEMA=[dbo]
However if I try to login using MSSMS with Active Directory - Password authentication I get
Login failed for user 'NT AUTHORITYANONYMOUS LOGON' (MIcrosoft SQL Server, Error 18456)
[Update]
In the Connection Properties Tab
I had to overtype with the database name

1 Answer
1
That particular page only shows an example using a SQL login/user, so I can understand why you are confused.
Please read through this page:
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-user-transact-sql?view=sql-server-2017
Specifically, you want to create a user using the AS EXTERNAL PROVIDER example. This tells SQL Azure (and SQL DW) to use Azure Active Directory instead of creating a SQL user. Please note that this does not (as of today) work in SQL Server. (SQL Server supports integrated authentication against a local Active Directory, but it just does not currently support the Azure Active Directory service).
Also, there is no specific requirement that you use SSMS to do this step. You can do it within SSMS, SQL Operation Studio, through one of the SQL client drivers in a program you write (or some third party program that can invoke SQL over them), sqlcmd, etc. You don't even need to have the latest SSMS to make things work (though it is recommend to get the best experience against SQL Azure including syntax highlighting).
Please give that a try and see if it gets you unblocked.
Best of Luck!
Specifically, you want to create a user using the AS EXTERNAL PROVIDER example
FROM EXTERNAL PROVIDER?– ta.speot.is
Aug 25 at 1:58
FROM EXTERNAL PROVIDER
working nicely now I have set the database name.
– Kirsten Greed
Aug 28 at 3:38
This worked for me, however, on followup logins, I did not need to add the DB name (though MSSMS did appropriately limit access to the one DB). I assume the AD/Azure SQL somehow recognized the principal was "OK" on the first try based on seeing the DB once, and then allowed access from then on.
– wayfarer
Sep 4 at 23:44
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
docs.microsoft.com/en-us/azure/sql-database/…
– Kirsten Greed
Aug 25 at 1:05