in one lineDevice code phishing is when an attacker starts a device sign-in and gets you to type its code, so your real login authorizes the attacker's machine.
the numbers
- 12,000+inboxes compromised through one device code phishing kit, per MicrosoftMicrosoft On the Issues (Digital Crimes Unit), 2026
- 15 minutesto type a Microsoft device code before it expires, by defaultMicrosoft Learn: OAuth 2.0 device authorization grant, 2026
- 1 hourdefault life of a Microsoft Entra access token, which can outlast a session revocationMicrosoft Learn: revoke user access in an emergency in Microsoft Entra ID, 2026
1what it is
The OAuth device authorization grant, published as IETF RFC 8628 in August 2019, lets a smart TV, a printer or a conference room screen sign in without a keyboard. The device shows a short code. You type that code on a sign-in page on your phone or laptop, sign in, and the device receives the tokens.
Device code phishing runs the same flow with a stranger's machine as the device. The attacker asks Microsoft for a code and sends it to you with a pretext: a Teams meeting ID, a shared document, a salary update. You type it on Microsoft's real page, sign in and approve the MFA prompt. The attacker's machine, which has been polling all along, receives an access token and a refresh token. The RFC describes this attack itself, in its section on remote phishing.
That is the difference from the relay kits in the session and token theft explainer. There is no lookalike page and nothing to intercept. The device code guide walks through the mechanism step by step.
2why it accumulates
Every check people were taught passes. The address is a real Microsoft domain, so "look at the link" says nothing. Proofpoint, a security vendor, said in its December 2025 research that awareness training built on checking URLs does not address this attack.
MFA works as designed, for the wrong device. Push approvals and one-time codes are completed by the real user. Reasoning from the mechanism, passkeys and security keys do not change the outcome either, because they check the domain and the domain is genuine. Microsoft's September 2026 analysis of the EvilTokens kit adds that a user who is already signed in only has to paste the code and confirm.
The flow stays open until someone closes it. Microsoft's own documentation calls device code flow "rarely used by customers, but is frequently used by attackers". Whether a tenant blocks it depends on security defaults, a Conditional Access policy or a Microsoft-managed policy that may still sit in report-only mode.
It moved from espionage to a commodity. Microsoft reported on 13 February 2025 that a group it tracks as Storm-2372 had used fake Teams invites with device codes since August 2024, a campaign told in the meeting invite record. Proofpoint saw widespread campaigns by September 2025, and a financially motivated group sending salary-themed lures from October. Microsoft's April 2026 report described kits that request the code only when the victim clicks, so the documented 15-minute expiry no longer gets in the way.
3what it costs you
The attacker leaves with a refresh token that keeps producing new access tokens, so a password reset alone does not end the session. That is the problem the token that lives forever covers. Microsoft's 14 February 2025 update on Storm-2372 described the actor registering its own device in the victim's directory to obtain a Primary Refresh Token. Microsoft's April 2026 report saw new devices registered within 10 minutes of the compromise in some cases, followed by inbox rules that redirected or hid mail.
The scale is now commercial. On 22 September 2026, Microsoft's Digital Crimes Unit said EvilTokens, a phishing-as-a-service kit launched in February 2026, had been linked to more than 12,000 compromised inboxes at over 10,000 organizations. That is Microsoft's figure, published about its own civil action authorized by the US District Court for the Eastern District of Virginia, with no judgment on the merits. Microsoft says the kit's chatbot read victims' mail to find trusted relationships and drafted messages impersonating them, which is how a stolen token turns into a redirected payment.
Microsoft Learn says access tokens last one hour by default and stop working only when they expire, and lists disabling the user's registered devices as a separate step from revoking sessions.
what it looks like when it goes wrong
Three ways this tends to go, each one taken from a real case.
- it happenedReddit, 2023howA fake login page passes the password and code to the real site as they are typed.what leavesinternal documents, code and dashboardswho ends up with itthe attacker behind the page
- it happenedUber, 2022howLogin prompts keep coming until a tired employee taps approve.what leavesadmin tools and company chatwho ends up with itan attacker who bought a contractor's password
- it happenedRetool, 2023howA caller posing as IT gets one code, and synced codes unlock the rest.what leavescustomer accounts and fundswho ends up with itthieves
4what works
The control that closes the door is blocking the flow. Microsoft's documentation recommends blocking it wherever possible and allowing it only where necessary.
- Look first. Filter the Entra sign-in logs by the device code authentication protocol for the last 30 days. Each legitimate entry should map to a room device or a tool someone can name.
- Security defaults. Microsoft's security defaults now block device code flow, and Microsoft says all new tenants have blocked it as part of security defaults since 1 July 2026. A tenant that turned security defaults off for Conditional Access needs its own block.
- Conditional Access. It needs at least Entra ID P1. Microsoft's how-to targets all users and all resources, sets the Authentication flows condition to device code flow, grants Block, and starts in report-only mode. It also says to exclude emergency access accounts and audit that list, which the break-glass guide covers.
- The managed policy. If a Microsoft-managed policy called "Block device code flow" appears in your tenant, Microsoft switches it on no less than 30 days after it arrives unless an admin sets it to Off. Decide its state on purpose.
- Narrow exceptions. Microsoft's own example is Android-based conference room devices, allowed only in one network location.
- One rule for staff. Proofpoint's advice is not to enter device codes received from untrusted sources. Put plainly: a code that arrives by mail, chat or invite is never yours to type.
Which device in your office would stop signing in if the flow were blocked tomorrow, and does anyone know its name?
on the record
your turn
what you can do about it
this week
Filter the last 30 days of Entra sign-in logs by the device code authentication protocol and name the device behind every entry.
An entry nobody can name means revoking that user's sessions and checking their registered devices and mailbox rules. A short or empty list means the flow can be blocked for everyone, with named exceptions.
go deeper
if you're not sure where to start
Run the offboarding checklist on one leaver. It covers every account and token to close when someone leaves.
open the checklist →
