What this change means
How responses are judged changed, Verification error handling changed. Changes how the detector verifies or what it treats as the credential.
Scanner deep dive
Azure Entra ID refresh tokens provide long-lasting access to an account.
ProviderNo provider details added yet.
Runs on any connection. Triggered by keywords in the content, after decoding.How TruffleHog works
The Refreshtoken detector checks decoded text containing “0.A” or “1.A” for a possible credential.
No regex is tied to this variant’s files.
| Refreshtokenrefreshtoken/refreshtoken.go | Serviceprincipalserviceprincipal/sp.go, serviceprincipal/v1/spv1.go, serviceprincipal/v2/spv2.go | |
|---|---|---|
| Keywords |
|
|
| Regexes | No regex is tied to this variant’s files. | No regex is tied to this variant’s files. |
No regex is tied to this variant’s files.
Used by more than one variant, or not tied to one variant’s files in what was read from source (shared files: common.go).
Regex 1
([\w-]+\.onmicrosoft\.com)Regex 2
\b[01]\.A[\w-]{50,}(?:\.\d)?\.Ag[\w-]{250,}(?:\.A[\w-]{200,})?v1 regex 1
(?i)(?:secret|password| -p[ =]).{0,80}?([\w~@[\]:.?*/+=-]{31,34}v1 regex 2
(?i)(?:secret|password| -p[ =]).{0,80}[^A-Za-z0-9!#$%&()*+,\-./:;<=>?@[\\\]^_{|}~]([A-Za-z0-9!#$%&()*+,\-./:;<=>?@[\\\]^_{|}~]{31,34})[^A-Za-z0-9!#$%&()*+,\-./:;<=>?@[\\\]^_{|}~]v2 regex
(?:[^a-zA-Z0-9_~.-]|\A)([a-zA-Z0-9_~.-]{3}\dQ~[a-zA-Z0-9_~.-]{31,34})(?:[^a-zA-Z0-9_~.-]|\z)What this detector does at each step of the TruffleHog pipeline.
Any one of these in the decoded text wakes the detector.
Verification. When a scan allows it, TruffleHog tests a match by calling the provider. A scan can turn this off for every detector or for this one. Atlas only describes this; it never tests credentials. How the verify decision works
Analyzer.None in the open-source code.
Each variant checks a found key its own way. Compare their requests and how answers are judged below.
The detection and verification evidence on this page comes from the Open Source implementation. Check the Enterprise coverage guide for product availability.
Not expected to: it’s a GET request, which reads without changing anything, and the source declares no changes.
| Refreshtokenrefreshtoken/refreshtoken.go | Serviceprincipalserviceprincipal/sp.go, serviceprincipal/v1/spv1.go, serviceprincipal/v2/spv2.go | |
|---|---|---|
| Request | POSThttps://login.microsoftonline.com/%s/oauth2/v2.0/tokenrefreshtoken.go:192 (opens TruffleHog source on GitHub) | POSThttps://login.microsoftonline.com/%s/oauth2/v2.0/tokensp.go:46 (opens TruffleHog source on GitHub) |
| Key is sent as | OAuth2 client credentials form | OAuth2 client credentials formsp.go:42 (opens TruffleHog source on GitHub) |
| How answers are judged |
|
If a result looks wrong, work through these steps. They’re built from the request and status rules above. The Atlas doesn’t send anything.
Each variant checks keys its own way. Use the one that matches your key’s format (see Detection above).
No command for this check. The check first trades the key for a token, so it takes more than one request.
No command for this check. The check first trades the key for a token, so it takes more than one request.
No provider doc recorded for this check yet. Look up the API docs for login.microsoftonline.com and compare what they say each status means.
Include the status code and response you got. Never include the key.
The CLI prints verified findings to stdout. Use --json for structured output.
Example scan output · credential redacted
✅ Found verified result 🐷🔑
Detector Type: AzureRefreshToken
Decoder Type: PLAIN
Raw result: [redacted]Terminal printer sourceWith --github-actions, GitHub Actions displays this workflow command as a warning on the indicated file and line.
::warning file=config/example.env,line=8,endLine=8::Found verified AzureRefreshToken result 🐷🔑GitHub Actions printer sourceLegacy compatibility. --json-legacy writes pre-v3 JSON for Git, GitLab, and GitHub sources only.
When Enterprise verifies that a secret is live, a configured notifier can alert your team. The finding is also available through the Enterprise API.
No analyzer is recorded for this detector, so Atlas shows no access assessment.
Use the provider’s instructions for this credential.
Rotation and revocation instructions
Microsoft documents app client-secret rotation and user refresh-token revocation separately. Revoking all refresh tokens for a user can also invalidate their browser sessions.
Different credential. The tutorial rotates a Storage account access key. This detector covers Entra credentials. View original tutorial
Provider documentation checked by Atlas on .
TruffleHog’s source looks for 2 token types, by prefix. It doesn’t name them.
| Prefix |
|---|
| 0.A |
| 1.A |
Written in the detector’s source by its authors. Shown as written: this doesn’t say what each page covers.
4 scanners have a confirmed match.
azure_active_directory_application_secretPush protection yes · Validity check nobetterleaks.azure-ad-client-secretThe rule declares validation, access mapping.1 recorded change since Sep 18, 2026; 1 still needs review.
How responses are judged changed, Verification error handling changed. Changes how the detector verifies or what it treats as the credential.
Facts on this page were read from trufflesecurity/trufflehog at commit 2325546.