Zippy ⚡
Security Microsoft 365 Phishing Entra ID Small Business IT

Attackers Are Planting Rogue Devices in Microsoft 365 Accounts — Changing Your Password Won't Fix It

What happened: Researchers at Huntress tracked an active phishing campaign that compromised 305 organizations in November. Attackers used a technique called device code phishing to register fake Windows devices inside victims' Microsoft 365 environments — gaining persistent access to OneDrive, SharePoint, and email that survives password resets.

This one is worth understanding because the attack is straightforward, the damage is durable, and the fix requires a step most IT responders skip. Here's what happened and what to look for.

How It Works

Microsoft 365 supports a login method called device code flow — originally designed for devices that can't do browser-based sign-in, like printers or smart TVs. The flow works like this: a device requests a short alphanumeric code from Microsoft, displays it on screen, and asks the user to visit a URL and enter the code to authorize the device.

Attackers have weaponized this flow. The phishing message — arriving by email, Teams, or LinkedIn — asks the target to enter a code at what appears to be a standard Microsoft login page. The URL is genuine. The page is real. The employee completes their normal login and MFA, and thinks nothing happened.

What actually happened: the employee just authorized the attacker's session, not their own. The attacker now has valid Microsoft tokens, which they use to register a rogue Windows device inside the company's Microsoft Entra ID (formerly Azure Active Directory). Once that device is registered, they receive a Primary Refresh Token (PRT) — a long-lived credential that grants access to every Microsoft service the account can reach, including OneDrive, SharePoint, Exchange, and Teams.

Huntress found 468 rogue device registrations across 326 employee accounts at 305 organizations throughout November. The devices were visible in Entra ID device lists the entire time. All of them followed the same naming pattern: MH- followed by 16 uppercase letters and numbers.

Why a Password Reset Doesn't Help

This is the part that matters most. The natural incident response is: we detected unauthorized access, reset the password, done. With this attack, that's not done.

A Primary Refresh Token is tied to the registered device, not to the user's password. When you reset the password, the PRT remains valid. The rogue device is still registered. The attacker can continue requesting new access tokens and reading email, browsing SharePoint, and downloading from OneDrive — without knowing the new password.

The correct remediation order is:

  1. Find and delete the rogue device from Entra ID first. Look in Microsoft Entra admin center → Devices → All Devices. Filter by registration date and check for MH- prefixed device names or any device the affected user doesn't own.
  2. Revoke all active sessions for the affected account (in Entra ID, select the user → Revoke sessions).
  3. Reset the password after the device is removed and sessions are revoked.

Doing steps 2 and 3 without step 1 leaves the attacker's access intact.

How to Reduce the Risk

Device code flow is a legitimate feature but most business users never need it. It can be blocked without affecting normal work for the vast majority of employees:

MFA doesn't stop this attack. The employee completes MFA normally — they're authenticating against a real Microsoft page. The attack works because the authentication succeeds. The issue is what that authentication authorizes, not whether it happens.

What to Check Right Now

If your organization uses Microsoft 365, it's worth a quick look:

Source: Huntress — Device Code Phishing Campaign, November 2026

Questions about your Microsoft 365 setup?

If you want to check whether your environment has exposed device registrations or talk through Conditional Access configuration, give us a call. (614) 291-4357 or reach out online.

Learn more about our managed IT services or get in touch.

← Back to Tech News