Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Active Directory user group as login in SQL Server

I have a .net application which is connecting to the SQL Server using windows authentication.

We cannot use SQL Server authentication in the application. We have lot of Active Directory users there for our project. So we have to create separate login account for each Active Directory users in SQL Server rather than creating separate login account for each AD users, is there any way to use the active directory user group in SQL Server?

like image 417
Jibu P C_Adoor Avatar asked Feb 17 '11 12:02

Jibu P C_Adoor


People also ask

How do I give access to an AD group in SQL Server?

Select and open the SQL Server with an Azure SQL Database. After that, open the SQL Server, click Active Directory admin, and press the "Set admin" option. Then, select a User or a Group as the Active Directory Administrator. Select the user or group and click on "Save".


1 Answers

In SQL Server Management Studio, go to Object Explorer > (your server) > Security > Logins and right-click New Login:

enter image description here

Then in the dialog box that pops up, pick the types of objects you want to see (Groups is disabled by default - check it!) and pick the location where you want to look for your objects (e.g. use Entire Directory) and then find your AD group.

enter image description here

You now have a regular SQL Server Login - just like when you create one for a single AD user. Give that new login the permissions on the databases it needs, and off you go!

Any member of that AD group can now login to SQL Server and use your database.

like image 127
marc_s Avatar answered Oct 05 '22 15:10

marc_s