question

mkrausnick avatar image
mkrausnick asked

How does SQL Server handle permissions for a user in multiple AD groups with differing permissions

In an Active Directory setting, if a user exists in multiple groups with permissions in a database, does the user get the greatest permissions allowed, or the least, if the groups have differing permission levels. For example, if a user is a member of MyDBUsers with read/write permission and also MyDBAdmins with dbo permissions, does the user have dbo privilege?
permissions
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Wimbush avatar image
David Wimbush answered
If it's all GRANTs, they will get the union of all permissions for the the groups they belong to. For example, if one group is a member of the db_datareader role and the other group is a member of the db_datawriter role, a member of both groups will be able to read and write. I believe a DENY will trump a GRANT in most cases. For example, you could be in a select group that is a member of db_datareader but also in a group that contains everyone except HR that is denied permissions on the EmployeeSalary table, in which case you could read anything except that table. I think there are some roles who can't be denied certain things though. I doubt you can deny anything to a memver of the sysadmin server role, or anything at database level to a member of dbowner.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mkrausnick avatar image mkrausnick commented ·
Thanks, David! That's what I thought but I wanted to know for sure.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.