An Azure NoSQL database service for app development.
Thank you for raising this question and sharing your observations.
Azure DocumentDB supports Microsoft Entra ID authentication, including the ability to configure secondary native users with read-only and read/write permissions.
However, it is important to distinguish between authentication, which establishes the user's identity, and authorization, which determines the database operations that identity can perform.
For configuring access:
- Enable** Microsoft Entra ID **authentication on your Azure DocumentDB cluster.
- Register** the Microsoft Entra ID **identity on the cluster.
- Configure** the appropriate **permissions using the supported role-management mechanism.
For secondary users, Azure DocumentDB supports the following native roles:
-
readAnyDatabase: Read-only access. -
readWriteAnyDatabase: Read/write access, assigned on theadmindatabase.
Please note that ARM** REST APIs, ARM-based Azure CLI commands, Bicep, and Terraform do not support secondary-user role **assignments. These roles should be managed through MongoDB-compatible drivers or tools such as mongosh.
The following documentation provides guidance on configuring secondary users and their privileges:
- Read and read/write privileges with secondary native users
- Microsoft Entra ID authentication and RBAC
For Microsoft Entra ID identities specifically, please refer to the section covering secondary Microsoft Entra ID users in the second article.
We appreciate the feedback and recognize the importance of more granular authorization for enterprise applications.
Please let us know if you encounter any issues following the documented configuration steps.
Regards,
Avijit