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

# Microsoft Entra ID client secret (`azure_entra_client_secret`)

> **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.

Client secret of a Microsoft Entra ID (Azure AD) application registration, used by a service principal to obtain tokens. Microsoft Purview describes the secret as up to 40 letters, digits and the characters - _ . ~. Secrets generated in the current format carry the marker Q~ after four characters; the regexp follows the gitleaks rule for this format and does not match older secrets.

- 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_~.]{3}[0-9]Q~[A-Za-z0-9_~.-]{31,34}$
```

## Examples

- `Bb2Cc~3Dd4.-Ee5Ff6Gg7Hh8Ii9Jj0_Kk1Ll2Mm3` (invalid example) — Pattern example from the Purview definition, without the Q~ marker

## Mappings

- purview: `Microsoft Entra client secret`, `Azure AD client secret`

## Supported by tools

- `cloudflaredlp`
- `datadogsds`
- `gitguardian`
- `githubsecretscanning`
- `gitleaks`
- `microsoftpurview`

## Sources

- doc: <https://learn.microsoft.com/en-us/purview/sit-defn-azure-ad-client-secret>
- other: <https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml>

## Quality

Score 80/100. Missing: examples, translation.

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