Device Code Phishing: The Login Trick That Gets Past MFA and Passkeys
A fast-growing attack skips the fake login page entirely and asks your staff to type a short code into the real Microsoft sign-in screen. Here is how device code phishing steals a live session, and how to shut it down.

Most phishing you have been warned about relies on a fake website. The attacker copies a Microsoft or Google login page, you type your password into it, and they catch it. Training teaches people to check the address bar, and password managers refuse to fill credentials on the wrong domain. Device code phishing was built to get around all of that, and through late 2026 it has become one of the fastest-growing techniques against organizations that run Microsoft 365.
What makes it dangerous is that there is no fake page to spot. The employee signs in on the real Microsoft screen, at the real address, and still hands the attacker the keys.
What the device code flow is for
Some devices are awkward to log in on: a smart TV, a printer, a command-line tool, a conference-room display. To help, Microsoft and other providers offer a "device authorization" flow. The device shows a short code and a web address. You open that address on your phone or laptop, type the code, sign in normally, and the device is now logged in. It is a legitimate, useful feature.
The attacker abuses it by starting that flow themselves and tricking an employee into completing it on their behalf.
How a device code attack works
- The attacker begins a device code sign-in for your organization's Microsoft 365. Microsoft hands them a genuine short code, valid for a few minutes.
- They send that code to an employee inside a convincing message: an email that looks like IT, a Teams message, or a phone call claiming a system needs to be "re-verified."
- The employee is told to go to the real Microsoft device-login page and enter the code. Because the page is genuine, every warning sign they were taught to look for is absent.
- The employee signs in and completes MFA, approving the prompt on their own phone as they always do.
- Microsoft issues the access token to the attacker's waiting session. They are now signed in as that employee, without ever knowing the password.
The reason MFA and passkeys do not save you here: the employee really did authenticate, on the real site, with their real second factor. The attacker is not defeating MFA. They are letting the employee pass it for them and collecting the result.
Why it beats the usual defences
- The domain is real. There is no lookalike address to catch, so password managers fill normally and link-checkers see nothing wrong.
- MFA is satisfied. The login completes every security step, which is exactly why the stolen session is so useful.
- It survives password resets. The attacker holds a token, not a password, so changing the password later does not evict them. The session has to be revoked.
- It is quiet. To the employee, nothing happened beyond approving a login that felt routine.
The signs for your staff
Because there is no fake page, the warning sign is the request itself:
- Anyone sending you a login or verification code and asking you to enter it. Codes are for you to request, never to receive and type in for someone else.
- A message or call saying you must "re-verify," "re-authenticate," or "activate" your account using a code they provide.
- A device-login or "enter code" screen you did not reach by signing in to something yourself.
- Pressure and a short deadline, because the real code expires in minutes and the attacker needs you to act before it does.
Simple rule that covers it: you enter a sign-in code only on a device you are personally setting up, and only a code that device just showed you. A code that arrived by email, text, chat or phone call is never yours to enter.
What an organization can do
- Block the device code flow where it is not needed. In Microsoft Entra, a Conditional Access policy can disable device code sign-in for everyone except the few teams that genuinely use it. This is the single most effective control.
- Alert on device code sign-ins. They are rare in most organizations, so a sudden one is worth flagging and reviewing.
- Shorten session lifetimes and require reauthentication for sensitive apps, so a stolen token is useful for less time.
- Make revoking sessions routine. When an account may be compromised, revoke its tokens, do not just reset the password.
- Tell staff the rule plainly and practise it, so a request to enter a code feels wrong the moment it arrives.
Where this fits in the bigger picture
Device code phishing is part of a clear shift through 2026: attackers have moved from stealing passwords toward stealing sessions. Passwords are increasingly protected by MFA and passkeys, so the valuable prize is a token that has already cleared those checks. Expect more techniques, not fewer, that aim to make a real person complete a real login on an attacker's behalf.
The defence is the same one that holds across all of them: the moment someone else is steering your login, stop. CyberWatch AI gives employees short, practical lessons on exactly these attacks, sends safe practice versions so the request feels familiar before a real one lands, and gives administrators a clear view of who would spot it and who needs another round.
Frequently asked questions
Does multi-factor authentication stop device code phishing?
No. The employee completes MFA on the real Microsoft page, so the attacker inherits a session that has already passed MFA. The defence is to recognise the request and never enter a code someone sent you.
Do passkeys protect against this attack?
Passkeys stop password and fake-page phishing, but in a device code attack the employee signs in legitimately on the real site, so a passkey login still hands the attacker a valid token. Blocking the device code flow where it is not needed is the real fix.
What is the one rule staff need to remember?
Never type a sign-in code into a page because an email, message or caller asked you to. A genuine code only ever comes from a device or app you are signing in to yourself.
Sources
- The CyberThreat Report: November 2026, Trellix Advanced Research Center
- Phishing Threat Trends Report, Volume 8, KnowBe4


