Add active directory group to AZURE SQL

Waleed Ebrahiem 31 Reputation points
2021-04-20T09:09:21.113+00:00

Hi

I have a an AD group created in AZURE, and I need to add it to AZURE SQL to be able to access certain object.

Any advice on how can I manage that?

Regard

Waleed

Azure SQL Database
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Andriy Bilous 11,821 Reputation points MVP Volunteer Moderator
    2021-04-20T15:27:19.37+00:00

    Hello @Waleed Ebrahiem

    First create security group in Azure AD (For example AZ-Users)
    Using SQL SERVER Management Studio connected to the Database and execute New Query.

    CREATE USER [AZ-Users] FROM EXTERNAL PROVIDER  
    

    The group has been created in Azure SQL Database

    To give read-only permissions to the group AZ-Users execute query

    EXEC sp_addrolemember 'db_datareader', 'AZ-Users'   
    

    https://learn.microsoft.com/en-us/azure/sql-database/sql-database-aad-authentication-configure?tabs=azure-powershell#create-contained-database-users-in-your-database-mapped-to-azure-ad-identities
    https://learn.microsoft.com/en-us/azure/sql-database/sql-database-manage-logins

    4 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.