How to read a Microsoft Entra access token
What the claims in a Microsoft Entra ID access token mean for an investigation: tenant, client app, MFA in amr, admin roles in wids, scopes, the sign-in IP and lifetime, plus how to respond when a token has been stolen.
Tokens turn up in incidents more often than they used to. An adversary-in-the-middle phishing kit captures one, an infostealer log on a paste site contains a dozen, or a developer leaves one in a support ticket. The first questions are always the same: whose is it, what can it do, and is it still valid?
A Microsoft Entra ID access token answers most of that by itself. It's a JSON Web Token: three Base64url-encoded parts separated by dots, and the middle part is a readable list of claims. This guide covers how to read a Microsoft Entra access token and which claims matter for an investigation.
Treat a live token like a password. Anyone holding it can call the API it was issued for until it expires. Decode tokens in a tool that runs locally, prefer expired ones, and don't paste them into tickets or chat.
Which claims identify the user and tenant?
| Claim | What it tells you |
|---|---|
upn, unique_name, preferred_username | The signed-in account |
oid | The user's object ID, which doesn't change if the UPN does. Search sign-in logs with it. |
tid | The tenant ID. A guest's token carries the resource tenant, not their home one. |
iss | The issuer, which also contains the tenant ID |
acct | 0 for a member, 1 for a guest |
Which app asked for the token, and for what?
appid (v1 tokens) or azp (v2) is the client application, and aud is the API the token is for. Microsoft's own apps have fixed IDs: 04b07795-8ddb-461a-bbee-02f9e1bf7b46 is the Azure CLI, 1950a258-227b-4e31-a9cf-717495945fc2 is Azure PowerShell, d3590ed6-52b3-4102-aeff-aad2292ab01c is Microsoft Office, and an aud of 00000003-0000-0000-c000-000000000000 means Microsoft Graph.
Public first-party clients like the Azure CLI deserve a second look. They need no app registration and work with device-code sign-in, which is why device-code phishing campaigns favour them. An ordinary finance user with an Azure CLI token for Graph is unusual.
Was MFA used?
The amr claim lists the authentication methods. ["pwd"] alone means password only. mfa means multi-factor was satisfied; ngcmfa (Windows Hello for Business) and fido count too. Note that mfa appears whether the user approved a push or used a phishing-resistant method, so it can't tell you whether an adversary-in-the-middle kit relayed the MFA. For that, compare the sign-in log's authentication details and IP.
What can the token do?
scplists delegated permissions: what the app can do as the user.Mail.ReadWrite,Mail.Send,Files.ReadWrite.AllandDirectory.AccessAsUser.Allare the ones that turn a stolen token into a business email compromise.roleson an app-only token lists application permissions, which apply to the whole tenant with no user involved.widslists the user's directory roles as template IDs.62e90394-69f5-4237-9190-012177145e10is Global Administrator.b79fbf4d-3ef9-4689-8143-76b194e85509appears for every user and isn't a privilege.offline_accessin the scopes means a refresh token was issued as well. That's the bigger prize: it can mint new access tokens for days.
When and where was it issued?
iat, nbf and exp are Unix timestamps. Entra access tokens usually live 60 to 90 minutes. ipaddr is the IP that signed in, which is the fastest pivot: check it against the user's normal locations and threat intel, then find the matching sign-in with the uti claim, which identifies the token in Entra sign-in logs.
What should I do if a token was stolen?
- Revoke the user's sessions (
Revoke-MgUserSignInSessionor "Revoke sessions" in Entra). This invalidates refresh tokens. Existing access tokens keep working until they expire unless Continuous Access Evaluation applies. - Reset the password and review MFA methods; attackers often register their own authenticator during the window.
- Search for what the token was used for: mailbox access, new inbox rules, app consents and file downloads from the token's IP. The inbox rules guide and consent phishing guide cover the common follow-ons.
- Close the door: block device-code flow if unused, require compliant devices or phishing-resistant MFA for admins, and consider token protection policies.
FAQ
Can I tell if a token is genuine just by decoding it?
No. Decoding reads the claims; only verifying the signature against Microsoft's published keys proves Entra issued it. For investigation, the claims are what you need, but don't trust a token's claims for access decisions without verification.
What's the difference between v1 and v2 tokens?
The ver claim says which. v1 tokens use appid and upn, v2 tokens use azp and preferred_username. The API being called decides which version it receives.
Does revoking sessions kill the access token immediately?
Not always. Revocation stops refresh tokens. The current access token stays valid until it expires, typically within 90 minutes, unless the resource supports Continuous Access Evaluation.
Why does the token show MFA when the account was phished?
Adversary-in-the-middle kits sit between the user and Microsoft and relay the MFA prompt, so the token correctly records that MFA happened. Phishing-resistant methods such as FIDO2 keys stop this.
The JWT Token Decoder explains every claim in your browser and flags missing MFA, privileged roles, risky scopes and abused client apps.
IOC Triage, our free browser extension, gives the IP from a token or sign-in log a verdict from 15 threat-intel sources with a right-click.