---
id: "azure_cosmosdb_key"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["secrets"]
langs: ["common"]
quality: 75
url: "https://registry.apicrafter.io/datatype/azure_cosmosdb_key"
---

# Azure Cosmos DB account key (`azure_cosmosdb_key`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Account key of Azure Cosmos DB, the AccountKey of a Cosmos DB connection string, which grants administrative access to the account. It is 88 Base64 characters ending in ==. Keys in the identifiable format carry the signature ACDb at positions 77 to 80; older keys have no signature, look like an Azure Storage account key and are not covered. The regexp follows the pattern of the Microsoft security-utilities library; Microsoft Purview describes the same key.

- Parent datatype: `symmetric_key`
- Personal data (PII): no
- Categories: Secrets and credentials (passwords, keys, tokens) (secrets)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[A-Za-z0-9+/]{76}ACDb[A-Za-z0-9+/]{5}[AQgw]==$
```

## Mappings

- purview: `Azure Cosmos DB account access key`

## Supported by tools

- `datadogsds`
- `gitguardian`
- `githubsecretscanning`
- `microsoftpurview`

## Sources

- doc: <https://learn.microsoft.com/en-us/purview/sit-defn-azure-cosmos-db-account-access-key>
- other: <https://github.com/microsoft/security-utilities/blob/main/GeneratedRegexPatterns/PreciselyClassifiedSecurityKeys.json>

## Quality

Score 75/100. Missing: examples, negative example, translation.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/azure_cosmosdb_key.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/azure_cosmosdb_key.yaml>
