The Small Business Microsoft 365 Security Review: What to Check, in Plain English
Ten Microsoft 365 settings a small firm can check in an hour: who can create groups, buy apps, consent to apps, and sign in the risky ways.
Read articleIdentity Security
A short code typed into Microsoft's own sign-in page can hand an attacker your mailbox. How device code phishing works, and how to block it.
Device code phishing tricks someone into typing a short code into Microsoft's genuine sign-in page, and the attacker walks away with a working session even though your staff member passed multi-factor authentication correctly.
There is no fake website in this attack. That is what makes it worth ten minutes of your attention.
Microsoft Threat Intelligence published the campaign that put this technique in front of ordinary businesses in February 2025, tracking the actor as Storm-2372 and describing lures that imitated Microsoft Teams meeting invitations. Microsoft updated that post on February 14, 2025 and again on July 31, 2026.
The device code sign-in flow exists for devices that cannot show a sign-in page: a smart TV, a conference room display, a tool that only runs in a terminal. The device shows a short code, you type the code on your phone or laptop, and the device gets signed in.
The attack borrows that flow, in four steps.
In its February 14, 2025 update, Microsoft described the same actor going one step further: using the Microsoft Authentication Broker client to register an attacker-controlled device in Entra ID and obtain a Primary Refresh Token, which is a much more durable foothold than a single session.
We have written about the attack where a proxy sits in front of a fake sign-in page and steals the session cookie. The advice there is passkeys, because a passkey is bound to the real site and will not sign you in to a copy.
Device code phishing is different in one specific way: there is no copy. The page is Microsoft's own, the sign-in really is yours, and the thing that goes wrong is that it authorises a session you did not start. A factor that proves the site is real cannot help when the site is real.
That is not a reason to skip phishing-resistant MFA. Microsoft's guidance in the same post still recommends MFA as an essential pillar of identity security and points to phishing-resistant methods such as FIDO tokens and passkeys. It stops the attacks it was built to stop. This is simply not one of them, and the control that addresses this one is a policy, not a factor.
Microsoft's own recommendation is blunt. On the page covering this policy, Microsoft writes: "We recommend organizations get as close as possible to a unilateral block on device code flow."
The policy lives in Conditional Access, and Microsoft's documented steps (last updated April 7, 2026) are:
Report-only first is not optional caution. It is how you find the one person in the office who signs in to a conference room display this way before you lock them out of it.
This is also a benchmark control, not just a vendor recommendation. The CIS Microsoft 365 Foundations Benchmark lists it as 5.2.2.12 (L1) Ensure the device code sign-in flow is blocked, with the same steps and the same note about excluding break-glass accounts.
Conditional Access requires Microsoft Entra ID P1. Microsoft states it directly on the Conditional Access overview: "Using this feature requires Microsoft Entra ID P1 licenses", and adds that "Customers with Microsoft 365 Business Premium licenses can also use Conditional Access features."
So if your firm is on Business Premium, you already have what you need. If you are on Business Standard or Business Basic, you do not, and no amount of clicking will produce this policy. Microsoft's Security Defaults are available to everyone, but we have not found a Microsoft source saying Security Defaults block the device code flow, so we are not going to tell you they do. If that is your situation, the honest options are to watch the sign-in logs as described below, or to add Entra ID P1 for the people who matter most.
Before you block anything, look. Microsoft's authentication flows documentation (last updated March 24, 2026) describes device code flow as "a high-risk authentication method that can be part of a phishing attack", and says that "filtering the sign-in logs for device code flow events with the authentication protocol filter can help" before you restrict it.
In practice: open the Microsoft Entra sign-in logs, add the Authentication Protocol filter, and select Device code. In most small offices the result is an empty list, which is the easiest version of this decision you will ever make.
Treat it as a compromised account, not a near miss. The tokens are already issued.
If nobody in your firm is watching for the stolen session, revoking it is a job that starts whenever someone happens to notice. That is the gap Managed ITDR is for: Huntress's security operations center watches Microsoft 365 and Google Workspace sign-ins around the clock and can revoke a confirmed stolen session, and Obsidian Ridge picks up everything after containment within one business day.
Huntress, whose platform we operate, reported on June 30, 2026 that over the past year "identity-based attacks accounted for 79% of all critical and high-severity incidents" it responded to. Device code phishing is one route into that number, and it is one of the few with a single setting behind it.
Ridge Core includes Managed ITDR on Microsoft 365 or Google Workspace, which is the part that watches for a stolen session and gets it revoked. If you would like someone to look at how your own tenant is configured before anything goes wrong, that is what the free review is for.
Last updated
October 14, 2026. We refresh this content as the threat landscape and tools evolve.
FAQ
No. The victim types the attacker's code into Microsoft's real sign-in page and passes their own MFA, so there is nothing for MFA to reject. The attacker's waiting session receives the access and refresh tokens instead.
Prevention is blocking device code sign-in where your firm does not need it. Detection is someone watching for the stolen session and revoking it.
Microsoft describes it as a way to sign in on a device that cannot show a normal sign-in page, such as a smart TV, a conference room display or a command-line tool.
The device shows a short code, and you finish signing in on a phone or laptop. Most small offices never use it, which is why Microsoft recommends blocking it where it is not needed.
Conditional Access, which is where the block is configured, requires Microsoft Entra ID P1. Microsoft states that customers with Microsoft 365 Business Premium licenses can also use Conditional Access features.
Without one of those, you cannot create the policy, and the realistic answer is to watch the sign-in logs and get the license.
In the Microsoft Entra sign-in logs, filter on the Authentication Protocol field and choose Device code. Microsoft also recommends creating the blocking policy in report-only mode first, which shows who the policy would have affected before it blocks anything.
Related reading
Ten Microsoft 365 settings a small firm can check in an hour: who can create groups, buy apps, consent to apps, and sign in the risky ways.
Read articleAttackers steal the session cookie your browser gets after the MFA prompt. What adversary-in-the-middle phishing is, and what stops it.
Read articleDefender for Identity installs sensors on domain controllers. If your business has no on-premises Active Directory, there is nothing for it to watch.
Read article