Rogue Devices Survive Microsoft 365 Resets

CSO Online · High sophistication
Last updated December 4, 2026

An active phishing campaign tricks Microsoft 365 users into approving a legitimate device sign-in code. Attackers then register their own Windows device, allowing continued access to mailboxes and files even after the victim changes their password. The activity has affected hundreds of organizations and is aimed at OneDrive, SharePoint, and Exchange data.

How the attack worked

This campaign targets Microsoft 365 users through a technique known as device code phishing. Instead of harvesting passwords on a fake login page, attackers initiate a legitimate Microsoft sign-in themselves and then trick the victim into entering the resulting approval code on a genuine Microsoft authentication page. The lure is disguised as a routine business activity, such as accessing a shared document or joining a meeting. Once the victim approves the code, the attacker registers a rogue Windows device in Microsoft Entra ID and obtains a long-lived Primary Refresh Token, giving them standing access to the account.

Why it succeeded

The technique avoids the usual warning signs defenders train people to spot. The victim never visits a spoofed domain and never types a password into an attacker-controlled form. They personally approve the multi-factor authentication prompt on a page that is, in fact, genuinely Microsoft's. Because the device code flow exists to support hardware like smart TVs and printers that lack a keyboard, nothing about the underlying mechanism is broken or exploited technically. The weakness is entirely in how the request is framed to the user, which is what makes it difficult to recognize even for people who know to check a URL before entering credentials.

What to watch for

  • Any request to enter or approve a Microsoft device sign-in code that you did not personally initiate.
  • A code approval tied to an unexpected document request or meeting invitation.
  • Assuming that because a sign-in page looks genuinely like Microsoft's, the surrounding request must be safe.
  • Continued unusual activity in OneDrive, SharePoint, or Exchange after a password has already been changed.

Building resistance

According to the findings, more than 450 rogue devices were identified across hundreds of organizations, underscoring that this is not an isolated incident. Organizations can reduce exposure by training users to treat device code approval requests with the same scrutiny as any unsolicited sign-in attempt, and by instructing staff to only approve codes for sign-ins they personally started. Because a password reset does not remove a rogue device's access, incident response processes should explicitly include revoking active sessions and refresh tokens, removing unauthorized device registrations from Entra ID, and reviewing potentially compromised accounts and applications. Security and IT teams should also encourage prompt reporting of any unexpected sign-in or device approval prompt, since early reporting gives responders the best chance to contain access before data in Exchange, OneDrive, or SharePoint is exposed or used for further compromise, including business email compromise.

Key findings

  • Huntress identified more than 450 rogue devices across 305 organizations, registered against 326 identities.
  • Victims are tricked into approving a device code on a genuine Microsoft authentication page rather than entering a password on a fake website.
  • Attackers use the approved session to register a rogue Windows device in Microsoft Entra ID and obtain a long-lived Primary Refresh Token (PRT).
  • A password reset alone does not remove the attacker's access; responders must remove rogue devices and revoke active sessions and tokens.
  • The apparent objective is access to Microsoft 365 resources, including OneDrive, SharePoint, and Exchange, enabling data theft and potential business email compromise.
  • The article says the activity could not yet be attributed to a named threat actor.

Who’s being targeted

  • Commonly targeted roles: All Microsoft 365 users, Executives, Finance and accounts-payable staff, Human resources staff, Sales and client-facing teams, IT help desk and identity administrators, Security operations and incident-response teams.
  • Affected industries: Organizations using Microsoft 365, Organizations using Microsoft Entra ID.
  • Attack channels: email, website.
  • Impersonated: A trusted business contact or routine Microsoft 365 workflow.

Red flags to watch for

  • The recipient did not personally start the device sign-in process.
  • The request asks the user to enter or approve a device code for an unexpected document or meeting.
  • A genuine Microsoft page can still be part of a social-engineering attempt when the sign-in was initiated by someone else.
Try Mirage

Mirage safely runs attacks like this one against your own team, so you find out what happens before a real adversary does.

Get a demo

Frequently asked questions

Does resetting a password stop this Microsoft 365 attack?

No. Once a rogue device is registered in Entra ID with a long-lived Primary Refresh Token, a password reset alone does not remove the attacker's access. Responders must manually delete the rogue device and revoke active sessions and tokens.

How do attackers get victims to approve a device sign-in code?

Attackers start a legitimate Microsoft sign-in themselves, then trick the victim into entering the approval code on a genuine Microsoft authentication page, often disguised as a request to access a document or join a meeting.

Why is this attack hard to detect with normal phishing training?

The victim never visits a fake website or types a password into a fake form, and personally approves the MFA prompt on a real Microsoft page, which makes the request look legitimate.

What should employees do if asked to enter a device code unexpectedly?

Only enter a device code when they personally initiated the sign-in or have independently confirmed a trusted party started it, and report any unexpected prompt to IT or security immediately.

Read the video transcript

A meeting invite asks you to enter a Microsoft device code. Hold on. This is device-code phishing. The Microsoft page is real, but you didn’t start that sign-in. Approving the code gives someone else’s session access. That session can register a rogue Windows device in Microsoft Entra ID. Its Primary Refresh Token can keep OneDrive, SharePoint, and Exchange accessible even after a password reset. The giveaway: you never started the sign-in. If a document or meeting asks for a device code, report the request to security.

MITRE ATT&CK techniques

T1528 - Steal Application Access TokenT1098 - Account ManipulationT1656 - Impersonation

Similar attacks

Five Active Phishing Lures Hit US Firms

Five Active Phishing Lures Hit US Firms

The article describes active campaigns that use familiar business documents, trusted file-sharing services, AI brands, and Microsoft sign-in flows to trick employees into granting account access. The most actionable patterns are phishing emails and document links that lead victims to Microsoft…

November 5, 2026
Stolen Microsoft 365 Tokens Hit 79 Organizations

Stolen Microsoft 365 Tokens Hit 79 Organizations

Attackers used fake Microsoft sign-in pages and device-code phishing to capture or obtain authenticated Microsoft 365 sessions, bypassing the need to repeat multi-factor authentication. They then took over accounts, added their own devices and authentication methods, and hid messages with inbox…

October 27, 2026
OAuth Phishing Turns MFA Into a Bypass

OAuth Phishing Turns MFA Into a Bypass

Attackers are using real OAuth sign-in and consent flows to steal access tokens or trick users into authorizing malicious apps. Because the victim signs in through a legitimate identity provider and completes MFA, attackers can gain durable access that may survive password resets. The article…

October 22, 2026
Zimbra Emails Can Plant Hidden Mailbox Access

Zimbra Emails Can Plant Hidden Mailbox Access

Rapid7 demonstrated that a crafted email or calendar message can exploit Zimbra webmail flaws when a signed-in user interacts with it. The attack can create a hidden mailbox-delegation permission for an attacker-controlled account, allowing continued access even after the victim resets their…

December 4, 2026
Skyw4lker Uses Contracts to Hijack M365 Access

Skyw4lker Uses Contracts to Hijack M365 Access

The Skyw4lker campaign targets U.S. manufacturing, technology, and healthcare organizations with password-protected documents disguised as contracts or service proposals. Victims are sent through a Google-hosted page into a legitimate Microsoft authentication process, where completing an…

October 28, 2026
Token Replay Hits 79 Microsoft 365 Orgs

Token Replay Hits 79 Microsoft 365 Orgs

Attackers used fake Microsoft sign-in pages and device-code tricks to steal completed Microsoft 365 login sessions, then replayed those sessions without needing passwords or new MFA approvals. After entering accounts, they registered rogue devices, replaced MFA methods, and hid mailbox messages,…

October 23, 2026