Your project started with one or two people. Now developers, operators, analysts, and applications all need access to Azure Cosmos DB. Giving everyone the same permissions might feel efficient, but it makes every identity more powerful than its job requires.
As your team grows, organize access around jobs, not people. Separate management access from data access, assign roles to groups and workload identities, and use the smallest practical scope. You do not need a complicated permission model for every person. You need a small set of repeatable access patterns.
Separate managing the account from using its data
Azure Cosmos DB access has two planes:
- The control plane covers managing Azure resources: configuring the account, creating databases and containers, changing throughput, and managing role assignments. These permissions use Azure role-based access control (Azure RBAC).
- The data plane covers working with items: reading, querying, creating, updating, and deleting data. Azure Cosmos DB for NoSQL provides its own native data-plane RBAC.
That distinction lets you separate jobs that are often combined. A platform engineer can manage account configuration without reading customer data. An application can read and write items without changing throughput or networking. Being an Azure Owner or Contributor does not automatically grant item access. Similarly, a Cosmos DB data role does not grant permission to configure the account.
Start with a small role model
Do not create a custom role for every team member. Start with the jobs your team actually performs.
| Identity or group | What it needs | Starting point |
| Application developers | Build and test features | Data Contributor in nonproduction |
| Production application | Serve one workload | Managed identity with a scoped data role |
| Site reliability engineers | Diagnose health and configuration | Cosmos DB Operator; temporary data access if needed |
| Data analysts | Run approved read-only queries | Built-in Data Reader on reporting data |
| Platform engineers | Manage accounts, containers, and throughput | Cosmos DB Operator or a custom Azure role |
The two built-in data roles cover many workloads:
| If the identity needs to… | Start with… |
| Read items, run queries, and read the change feed | Cosmos DB Built-in Data Reader |
| Read, create, update, and delete items | Cosmos DB Built-in Data Contributor |
Data contributor includes delete permission. If an application should write but never delete, create a custom data role with only the required actions.
For control-plane work, Cosmos DB operator is often safer than a broad contributor role. It can manage Azure Cosmos DB resources but prevents access to account keys and connection strings.
Use groups for people and managed identities for applications
Direct assignments to individual users become difficult to track as people join, change teams, and leave. Assign roles to Microsoft Entra security groups instead.
A group name should describe the service, environment, and responsibility:
cosmos-orders-dev-contributors
cosmos-orders-prod-data-readers
cosmos-orders-prod-operators
When a developer changes teams, you update group membership rather than searching for assignments across subscriptions and accounts.
Applications should not share those human access groups. Give each workload its own managed identity. An orders API might need Data Contributor on the orders container, while a reporting job needs Data Reader on a reporting database. Separate identities make both permissions and activity easier to understand.
Deployment automation should also use a different identity from the running application. Creating containers and processing items are different jobs.
Scope each assignment to the work
A data-plane role can be assigned at the account, database, or container level. Choose the smallest scope that lets the identity do its job.
For example, an application that processes orders can use Data Contributor on the orders container instead of the entire account. An analyst can use Data Reader on a reporting database without receiving access to operational data.
Keep environments separate. Development access should not silently become production access.
| Environement | Useful human-access default |
| Development | Contributor access within the team’s resources |
| Test | Access required for deployment and testing |
| Production | No data access or read-only access, with elevation |
Scope and role work together. A narrow role at account scope might still expose more data than necessary. A broad role at container scope might still allow actions the workload should not perform.
Make production elevation temporary
Production incidents sometimes require more access. That does not mean the access must be permanent.
Use Microsoft Entra Privileged Identity Management for eligible Azure RBAC assignments. For Cosmos DB data-plane access, use a controlled process that adds the responder to a dedicated group, records the reason, and removes the membership after a short period.
The goal is not to slow down incident response. It is to prevent access granted during an incident from remaining in place.
Account keys can bypass the model
An identity that can retrieve an account key can use that key for broad data access while key-based authentication is enabled. That can undermine carefully scoped data-plane roles.
Prefer Microsoft Entra authentication for people and managed identities for Azure workloads. Migrate existing applications deliberately:
- Inventory applications, scripts, notebooks, and tools that use keys.
- Give each workload an identity and the required data role.
- Test every required operation and environment.
- Rotate keys to invalidate old copies.
- Disable local authentication after every dependency has migrated.
Do not disable key-based authentication before verifying all working paths. Treat the change as a migration, not a switch you flip without testing.
Refer to safe key rotation in Azure Cosmos DB to get visibility into key usage.
Wrapping up
A good access model does not need to start with a complex redesign. Start with the access you have today, organize it around the jobs people and applications perform, and keep roles, scope, and duration as narrow as practical.
As your environment grows, let the job drive the access. Give each identity what it needs to do its job, where it needs it, and for no longer than necessary
What to do next?
As the team grows, ask four questions for every identity:
- What job does it perform?
- Is that job on the control plane or the data plane?
- What is the narrowest role that supports it?
- What is the smallest scope and shortest duration it needs?
Those questions scale better than one-off permissions. They give people and applications the access they need without making broad production access the default.
About Azure Cosmos DB
Azure Cosmos DB is a fully managed and serverless NoSQL and vector database for modern app development, including AI applications. With its SLA-backed speed and availability as well as instant dynamic scalability, it is ideal for real-time NoSQL and MongoDB applications that require high performance and distributed computing over massive volumes of NoSQL and vector data.
To stay in the loop on Azure Cosmos DB updates, follow us on X, YouTube, and LinkedIn.

0 comments
Be the first to start the discussion.