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

# Azure AI services key (Azure OpenAI, Cognitive Services) (`azure_ai_services_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.

Key of an Azure AI services resource, including Azure OpenAI and the former Cognitive Services, sent in the api-key or Ocp-Apim-Subscription-Key header. Keys in the current format have 84 letters and digits with the marker JQQJ99 after the first 52 characters and a service signature ending in COG (AAAAACOG for AI services, AAABACOG for Azure OpenAI, AAAEACOG for Cognitive Services). Older keys are 32 hexadecimal digits, which look like an MD5 hash, and are not covered. The regexp follows the pattern of the Microsoft security-utilities library; Microsoft Purview describes the same key.

- Parent datatype: `api_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]{52}JQQJ99[A-Za-z0-9][A-L][A-Za-z0-9]{12}(?:AAAAACOG|AAABACOG|AAAEACOG)[A-Za-z0-9]{4}$
```

## Mappings

- purview: `Azure Cognitive Service key`

## Supported by tools

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

## Sources

- doc: <https://learn.microsoft.com/en-us/purview/sit-defn-azure-cognitive-service-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_ai_services_key.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/azure_ai_services_key.yaml>
