Least privilege for Azure SQL Database means custom database roles for Entra groups, not db_owner
Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.
Azure SQL Database has two layers: Azure RBAC for managing servers and databases, and database roles for data. Microsoft's documentation, read 16 Nov 2026, advises granting the least privileges necessary and says the db_datareader fixed role grants read access to every table in the database.
Open the calculator ยท All services
Azure SQL Database separates resource management from data permissions
Microsoft's documentation says Azure RBAC roles such as SQL DB Contributor and SQL Security Manager control management of SQL resources, while authorization to data is managed through database roles and explicit permissions. A management role does not by itself carry SQL query rights.
Microsoft describes the server admin created at deployment as mapping to the dbo user in each database, with all database permissions as a member of db_owner. It also describes a Microsoft Entra administrator, which can be an individual or a security group, with full administrative permissions.
Microsoft's guidance is to grant users the least privileges necessary, and to assign permissions to Entra security groups and roles instead of to individual users.
The identities that call this service (people, services, workloads, third parties) are covered in the Azure service identities guide and the workload identities guide.
Roles to avoid, with the documented reason
Several roles look administrative-only but reach data indirectly.
- SQL Server Contributor: Microsoft says it grants no SQL data-plane permissions directly, but control of administrator credentials can enable data-plane access.
- SQL DB Contributor: Microsoft says it grants no SQL query permissions directly, but its data-movement capabilities, such as copy, restore and export, can enable access.
- db_owner: Microsoft says to use it to grant full permission to only a few users.
- db_datareader: Microsoft says it grants read access to every table in the database, which is more than is strictly necessary, and that the fixed roles are not recommended for most production databases.
- ##MS_DatabaseManager## and ##MS_LoginManager## membership: Microsoft says members can create and manage databases or logins, and a member who creates a database maps to db_owner in it.
A minimal pattern for a reporting group
Microsoft's pattern is to put Entra users into a security group, create a contained database user for the group, and add that user to a custom role with specific permissions.
| Step | Statement or setting | Source detail |
|---|---|---|
| 1. Group | An Entra security group for the reporting team | Microsoft: use groups, not individual users |
| 2. Database user | A contained user mapped to the group | Created while signed in with an Entra account |
| 3. Role | CREATE ROLE, then grant only the needed object permissions | Microsoft: carefully grant each role the least permissions necessary |
| 4. Membership | ALTER ROLE ... ADD MEMBER for the group user | Permissions aggregate across all roles a user belongs to |
Narrowing controls inside the service
Fixed roles with a deny form exist: Microsoft lists db_denydatawriter and db_denydatareader among the nine fixed database roles. Custom roles remain the main tool, because they can be granted on specific objects instead of the whole database.
Microsoft notes that when a user belongs to several roles, the permissions add up, so removing a role does not help if another role grants the same right. Use the Microsoft Entra administrator as a group, so that membership changes do not require touching the server.
Checking what is used
Defender for Cloud permissions management covers identities that hold Azure RBAC roles on SQL resources, flagging excessive and unused permissions according to Microsoft's documentation. Entra access reviews can recertify membership of the groups that map to database users.
Inside the database, list role memberships and object permissions and compare them with the tasks each group performs. Remove any member of db_owner who has not changed schema.
Related pages
Sources
- Azure built-in roles for databases, read 16 Nov 2026
- Azure SQL logins and users, read 16 Nov 2026
- Defender for Cloud permissions management, read 16 Nov 2026
- Microsoft Entra access reviews, read 16 Nov 2026
Last reviewed 16 Nov 2026.