Active directory Integration with RBAC for Azure CosmosDB with Mongo API

Ashok Arumugam 20 Reputation points
2025-01-24T23:26:06.4166667+00:00

Planning to create RBAC for Azure Cosmos DB with Mongo API, is Active directory user integration is possible

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,738 questions
Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
871 questions
0 comments No comments
{count} votes

Accepted answer
  1. Mahesh Kurva 2,260 Reputation points Microsoft Vendor
    2025-01-25T01:08:46.3466667+00:00

    Hi @Ashok Arumugam,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    Yes, integrating Azure Active Directory (AAD) with Azure Cosmos DB using the MongoDB API is possible. Here are the steps you’ll need to follow:

    • Set up an Azure AD application and service principal. This will be used for authentication.
    • Configure your Cosmos DB account: Enable the RBAC capability by adding the EnableMongoRoleBasedAccessControl capability to your database account.
    • Assign roles to users: Use the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) to manage users and roles within your database.

    For more information, please refer the document: https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/how-to-setup-rbac

    Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

0 additional answers

Sort by: Most 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.