Check ID: cosmosdb_account_use_aad_and_rbac
Provider: Azure
Service: cosmosdb
Severity: HIGH
Categories: identity-access, secrets
Resource type: microsoft.documentdb/databaseaccounts

What this check verifies

Azure Cosmos DB accounts configured to use Microsoft Entra ID with Azure RBAC by disabling key-based credentials (disableLocalAuth=true). Clients authenticate with identities rather than account keys.

Risk

With local/key-based auth enabled, long-lived account keys can be leaked or shared, enabling unauthorized reads/writes and tampering. Access bypasses MFA and granular RBAC, hindering rotation/revocation and increasing persistence and lateral movement risks.

Recommendation

Disable local authentication by setting disableLocalAuth=true and require Entra ID + Azure RBAC for control and data access. Use managed identities, apply least privilege roles, retire shared keys, and enforce zero trust with conditional access and short-lived credentials.

Remediation

az resource update --resource-group <RESOURCE_GROUP> --name <COSMOS_ACCOUNT_NAME> --resource-type Microsoft.DocumentDB/databaseAccounts --set properties.disableLocalAuth=true

References

Where this check fires

This check runs on every scheduled scan against your Azure account. Findings appear at Cloud Security → Findings filterable by Check ID = cosmosdb_account_use_aad_and_rbac. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Azure checks