in this guide
Picture a 150-person engineering firm. The finance lead gets a Teams meeting invite from someone she chatted with on Signal a few days earlier. The invite says to join, she needs to enter a short code at a Microsoft address. She checks the link. It really is Microsoft. She types the code, signs in, approves the prompt on her phone, and nothing happens. The meeting never starts.
On the other side, a laptop she has never seen now holds a refresh token for her mailbox.
That is device code phishing. Nothing on her screen was fake. The page was Microsoft’s, the sign-in was hers, the MFA prompt was real. The only lie was about whose device she was signing in. This guide pairs with the token that lives forever: that one is about tokens that outlive the person, this one is about tokens handed to a stranger in the first minute.
who starts the sign-in, and who finishes it
- 1attacker asks for a codeMicrosoft issues a short user code and a hidden device code to the attacker's machine.
- 2the lureA meeting invite, a shared document or an "MFA update" asks the victim to enter the code.
- 3the real sign-inThe victim types the code on Microsoft's own page and completes MFA.
- 4tokens go to the requesterThe attacker's machine, polling all along, receives access and refresh tokens.
what the flow is for
The device authorization grant is a published standard, IETF RFC 8628 from August 2019. It exists for things that cannot show a proper login page: smart TVs, printers, conference room screens. The device shows a short code and an address. You go to that address on your phone or laptop, type the code, sign in, and the device gets its tokens.
The design has one property that matters here. The person who signs in and the device that receives the tokens are different machines, and the identity provider has no way to know whether they are in the same room. The RFC says so itself: its section on remote phishing describes an attack started on a device in the attacker’s possession and approved by a victim somewhere else. Its suggested mitigation is to tell the user they are authorizing a device and to show what that device is.
Microsoft’s documentation for its version of the flow gives the numbers. From the moment the attacker requests the code, the user has 15 minutes to sign in. A successful sign-in returns an access token and, when asked for, a refresh token. The same page notes that work and school accounts are not asked to consent again at this step, so the screen a business user sees is a normal sign-in.
why your MFA does not help here
MFA, and the training built around it, protects against one thing: someone else using your password or code on a page you do not control. Device code phishing skips that. The victim is on the genuine page and completes the genuine check.
Push approvals and one-time codes. The victim approves or types them, as intended. The approval goes to Microsoft, which hands the session to the device that started the request.
Phishing-resistant factors. Passkeys and security keys refuse to work on a lookalike domain. That is why the session and token theft explainer leans on them against relay kits like the one in the Tycoon2FA record. Here the domain is the real one, so the passkey works exactly as designed. Reasoning from the mechanism, a strong factor makes this attack no harder. Microsoft still recommends phishing-resistant MFA in its April and September 2026 device code reports, as one layer among several. The guide on passkeys covers what they do fix.
Already signed in. Microsoft’s September 2026 analysis of the EvilTokens kit notes that a victim with an active session does not even see a password or MFA step: pasting the code and confirming is enough.
what the victim can check, and what it tells them
what looks right
every check a trained user makes
- The address is a real Microsoft domain
- The sign-in page is genuine
- The MFA prompt arrives on their own phone
- No attachment, no strange download
what is really happening
invisible from the victim's side
- The code was requested by someone else's machine
- The tokens go to that machine
- The refresh token keeps working after the meeting "fails"
- Sign-in logs show a legitimate app
The page is real. The question nobody can see is whose device asked for it.
what the record shows
Storm-2372, from August 2024. Microsoft Threat Intelligence published its report on 13 February 2025 and said the campaign had been active since August 2024. The lure was a fake Teams meeting invitation sent by email, with first contact that Microsoft says likely came over WhatsApp, Signal or Teams. Once inside, the actor used Microsoft Graph to search mail for words like “password”, “admin” and “credentials”, and sent fresh device code lures from the victim’s account. A day later Microsoft added an update: the actor had switched to a client ID that let it register its own device in the victim’s directory and obtain a Primary Refresh Token. Microsoft’s 31 July 2026 update to the same post assesses Storm-2372 as an initial access sub-cluster of Midnight Blizzard, the group behind the retired test tenant record.
Several actors at once. The same day, Volexity, a security vendor, described several Russian clusters running the technique since mid-January 2025, with lures posing as the US Department of State, Ukraine’s Ministry of Defence and the European Parliament. Volexity noted the codes are “only valid for 15 minutes”, which is why the attackers chatted with targets in real time first.
From espionage to mass mail. Proofpoint’s threat research, published 18 December 2025, found that widespread device code campaigns had appeared by September 2025, which it called highly unusual. One financially motivated group sent salary-amendment lures to ordinary staff from October 2025.
A kit for hire. Microsoft’s April 2026 analysis described landing pages that request the code only when the victim clicks, so the 15-minute clock starts at the moment of use. In some cases a new device was registered within ten minutes of the sign-in. On 22 September 2026, Microsoft’s Digital Crimes Unit said a phishing-as-a-service kit called EvilTokens, launched in February 2026, had been linked to more than 12,000 compromised inboxes at over 10,000 organizations. Microsoft says the kit included a chatbot that read a victim’s mail to find payment authorizations and “money movers”. These are Microsoft’s statements in its own civil action, authorized by the US District Court for the Eastern District of Virginia; there is no judgment on the merits.
what the stolen tokens are worth afterwards
The attacker leaves with a refresh token, so changing the password does not close the door on its own. Two follow-ups make it worse.
A registered device. With a device registered in your directory and a Primary Refresh Token, the attacker looks like a managed laptop. Microsoft’s revoke-access guide lists disabling the user’s registered devices as a separate step from revoking sessions.
Mail rules and payments. Microsoft’s 2026 reports describe malicious inbox rules created hours after the sign-in to hide replies, and searches for invoices and wire details. That is where this guide meets the payment approval guide and the mail layer, where rules are hard to see at all.
The hour after revocation. Microsoft’s documentation says access tokens last one hour by default, and its April 2026 report notes that standard revocation can leave them working for up to an hour. Revoke sessions, disable the account if needed, remove the devices, then check the mailbox rules.
switching the door off
For most companies the fix is to stop allowing the flow. Microsoft’s own wording on its managed policy is that device code flow is “rarely used by customers, but is frequently used by attackers”.
If you run security defaults. Microsoft’s security defaults page now lists blocking device code flow among its controls, and says that from 1 July 2026 every new tenant blocks it as part of security defaults. Older tenants should check what their own settings show before assuming.
If you use Conditional Access. Conditional Access needs Entra ID P1, which Microsoft 365 Business Premium includes. Microsoft’s how-to creates a policy for all users and all resources, with the condition Authentication flows set to Device code flow and the grant set to Block. It is created in report-only mode first, then switched on. Microsoft also ships a managed policy called “Block device code flow”: it appears in report-only mode and, per Microsoft’s documentation, is switched on no less than 30 days later unless an admin sets it to Off. If yours is sitting in report-only, someone should decide on purpose.
The exceptions. Android-based conference room devices and legacy tooling that cannot be updated may still use the flow. Microsoft’s guidance is to keep the block and scope a narrow exception, for example those room devices in one office location. Its how-to also says to exclude emergency access accounts and to audit that exclusion list regularly; the break-glass guide covers why those accounts need watching.
Other providers. Google’s documentation limits its device flow to a short list of scopes such as basic profile and per-file Drive access, which leaves Gmail out. Any other tool that offers a device login needs its own check.
what to tell people
Training cannot rely on “check the address”, because the address is genuine. Proofpoint’s advice is one rule: do not enter device codes received from untrusted sources. A plainer version for staff: a sign-in code is something you type into a screen in front of you. If a code arrives by email, chat or meeting invite, nobody needs you to type it. For the short version, see the device code phishing explainer, and for the full Storm-2372 story, the meeting invite record.
If the logs show a device code sign-in nobody can explain, which mailbox rules and registered devices does that account have today?
on the record
all myths →sources
- IETF RFC 8628: OAuth 2.0 Device Authorization Grant (August 2019)
- Microsoft Learn: OAuth 2.0 device authorization grant, Microsoft identity platform
- Microsoft Threat Intelligence: Storm-2372 conducts device code phishing campaign (13 February 2025, updated)
- Volexity: multiple Russian threat actors targeting Microsoft device code authentication (13 February 2025)
- Proofpoint: access granted, phishing with device code authorization for account takeover (18 December 2025)
- Microsoft Security Blog: inside an AI-enabled device code phishing campaign (6 April 2026)
- Microsoft Threat Intelligence: unmasking EvilTokens, getting to the root of device code phishing (22 September 2026)
- Microsoft On the Issues: disrupting EvilTokens, the AI chatbot built for cybercrime (22 September 2026)
- Microsoft Learn: authentication flows as a condition in Conditional Access policy
- Microsoft Learn: block authentication flows with Conditional Access policy
- Microsoft Learn: Microsoft-managed Conditional Access policies
- Microsoft Learn: configure security defaults for Microsoft Entra ID
- Microsoft Learn: Microsoft Entra Conditional Access overview (license requirements)
- Microsoft Learn: revoke user access in an emergency in Microsoft Entra ID
- Google for Developers: OAuth 2.0 for TV and limited-input device applications
