Microsoft 365 device-code phishing tricks someone into entering a code for a sign-in request started by an attacker, potentially sending authentication tokens to the attacker’s application. The page can be genuine, and the sign-in may still include multifactor authentication (MFA).

Treat an unexpected device code as an approval request: if you didn’t start the sign-in on the device or app you intend to authorize, don’t enter it.

How a device code can authorize the wrong request

Huntress explains device-code phishing

Device-code authentication is a legitimate sign-in method for devices or apps where typing credentials into a browser is difficult, such as command-line tools. The app requests a code; the user enters it on another device and completes the sign-in. If authentication succeeds, Microsoft can return tokens to the app that initiated the request, as Microsoft’s device-code documentation explains.

In a phishing attempt, the attacker starts that request and sends the code to a potential victim through a lure. If the victim enters it on Microsoft’s real sign-in page, they may be authorizing the attacker’s request—not signing in to an app or device of their own. A genuine Microsoft page confirms where the code is being entered; it does not tell the user who initiated the request.

The sign-in can include consent and MFA when required. Those steps do not, by themselves, reveal which app or device the user is authorizing. The risk is that the victim completes a real authentication for a request they did not start, rather than that the flow necessarily skips MFA. Microsoft’s guidance for acquiring a token with device-code flow describes the normal sign-in experience.

A successful response can include an access token and, if the request includes the offline_access permission, a refresh token. Microsoft gives 15 minutes as the default code-expiry period; the response for a particular request supplies its actual expiry.

Huntress analyst Luke Wilkinson explains the general attack sequence in this video. It covers device-code phishing generally, not the specific reader report discussed below.

A reported Microsoft 365 phishing lure

A German-language email screenshot shows a construction-project offer request, a PDF attachment, a link, and redacted sender details.
A German-language verification page displays a code and instructions to sign in with a Microsoft account.
A German-language Microsoft device-code page with an empty code field and a warning not to enter codes from untrusted sources.

In a report dated November 9, 2026, BornCity described a reader’s account of a construction-project quotation request delivered with a PDF attachment. The reader said the document-verification page displayed a code and directed recipients to authenticate through Microsoft.

The verification page presented code-entry instructions alongside a button to continue with Microsoft. That kind of prompt can make an unexpected request feel routine: the page frames code entry as a step to view a document.

The Microsoft device-code page states that the app or device associated with the code will gain access to the account. That is the practical check: only enter a code for a sign-in you initiated and recognize.

How organizations can restrict device-code sign-ins

Microsoft classifies device-code flow as high risk and recommends blocking it wherever possible. In Microsoft Entra, Conditional Access can target this authentication flow. Before enforcing a block, administrators can review device-code activity in sign-in logs and test the policy in report-only mode. Exceptions should be limited to identified business needs; Microsoft’s Conditional Access implementation guidance also discusses dependencies such as legitimate Teams devices and device registration.

Security Defaults block device-code flow as a broader baseline. Apps and devices that depend on the flow cannot complete sign-in while those defaults are enabled. Organizations that need more granular control and exceptions can use Conditional Access; Microsoft explains the distinction in its Security Defaults guidance.