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



overtype the database name





docs.microsoft.com/en-us/azure/sql-database/…
– Kirsten Greed
Aug 25 at 1:05




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.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ

How do I collapse sections of code in Visual Studio Code for Windows?