Entra Rogue Device Checker
Huntress reports a device code phishing campaign in which, once a victim entered the attacker's code, rogue Windows devices were registered in Microsoft Entra ID to get a Primary Refresh Token: 468 registrations across 326 identities in 305 organizations in November 2026. The device survives a password reset, so it has to be found and deleted. Paste your own device list, sign-in and audit exports and see which devices and sign-ins match what Huntress published (our write-up).
Check only a tenant your organisation owns. Everything is read in your browser and never uploaded; nothing connects to Microsoft. A match is worth checking, not proof of compromise.
1. Export from your own tenant
Read-only exports. Check only a tenant your organisation owns. This tool never connects to Microsoft: you run these yourself and paste the output.
Get-MgDevice -All | Select-Object Id,DeviceId,DisplayName,OperatingSystem,OperatingSystemVersion,TrustType,RegistrationDateTime,ApproximateLastSignInDateTime,PhysicalIds,IsManaged,IsCompliant,AccountEnabled | ConvertTo-Json -Depth 3 | Out-File devices.json
Read only. Or use Entra admin center > Entra ID > Devices > All devices > Download devices (CSV, no physicalIds; tick Owner / User principal name under Manage view > Columns).
union SigninLogs, AADNonInteractiveUserSignInLogs | where TimeGenerated > ago(30d) | project TimeGenerated, UserPrincipalName, IPAddress, UserAgent, AppDisplayName, AuthenticationProtocol, ResultType, ResultDescription, IsInteractive
Export the result as CSV. Or download sign-in logs from the admin center (interactive and non-interactive).
AuditLogs
| where TimeGenerated > ago(30d)
| where OperationName in ("Register device","Add device","Add registered owner to device","Add registered users to device")
| project TimeGenerated, ActivityDisplayName = OperationName, InitiatedBy = tostring(InitiatedBy.user.userPrincipalName), IPAddress = tostring(InitiatedBy.user.ipAddress), Target = tostring(TargetResources[0].displayName), ResultOr download the audit log from Entra ID > Devices > Audit logs. Activity names from Microsoft's audit activity reference.
2. Paste or drop the exports
Each box is optional and every input is recognised from its content, so a file can go anywhere. Read in your browser, never uploaded.
Loading…
Sample report · illustrative data
Sample result: rogue device check for a made-up tenant
A Get-MgDevice export with six devices, five sign-ins and five audit events from a fictional example.com tenant. User names are hidden, as they are by default.
Summary
- Devices to check first
- 3 of 6
- Sign-ins matching an indicator
- 4 of 5
- Users involved
- 2
- Score
- PlayCISO heuristic, not a verdict
Devices ranked (excerpt)
| Device | Level | Why |
|---|---|---|
| MH-51FB898341CEA47A | High | MH- + 16 hex name; Windows 10.0.19041.928 (ROADtools default) with no hardware identifiers; second device for d***@e***.com registered within a minute |
| MH-0C33A9E1D2F47B80 | High | MH- + 16 hex name; Windows 10.0.26100 with no hardware identifiers; same user, within a minute |
| DESKTOP-R7XK2P9Q | High | Windows 10.0.19045.2006 with no hardware identifiers; DESKTOP- + 8 characters; registered, not managed |
| DESKTOP-4KQ7T2M | Not flagged | Entra joined, managed, hardware identifiers present, current build |
Sign-ins (excerpt)
| User | IP | Why |
|---|---|---|
| d***@e***.com | 181.214.147.42 | Published scripted sign-in IP; python-requests user agent |
| d***@e***.com | 203.0.113.10 | AADSTS50199 on Microsoft Authentication Broker |
| s***@e***.com | 198.51.100.77 | Dsreg/10.0 (Windows 10.0.19041.928) registration user agent |
First steps
- Confirm with each user, then disable and delete the three devices (a password reset alone does not remove them).
- Revoke-MgUserSignInSession for both users, then reset their credentials.
- Audit their registered devices, MFA methods and inbox rules.
- Require MFA to register devices and block device code flow with Conditional Access.
Made-up example data. Your own run uses your inputs. Downloads of the full report need Pro.
TL;DRWhat this checker does
5 points
- Checks your own Microsoft Entra ID device list, sign-in logs and audit logs for the signs of rogue device registration after device code phishing.
- Huntress reports 468 rogue device registrations across 326 identities in 305 organizations in November 2026: after a victim entered an attacker's device code, Windows devices were registered in Entra ID to get a Primary Refresh Token.
- Flags device names like MH- plus 16 hex characters, the Windows builds Huntress lists (10.0.19041.928, the ROADtools default), devices with no hardware identifiers, two devices registered for one user within minutes, the five published sign-in IPs, scripting user agents and AADSTS50199 on Microsoft Authentication Broker.
- Ranks devices with reasons, groups everything by user and gives the clean-up steps with copy-only Microsoft Graph PowerShell commands. User names are hidden by default.
- Runs in your browser: nothing is uploaded and nothing connects to Microsoft. A match is worth checking, not proof of compromise.
What it looks for
| Signal | Source | Level |
|---|---|---|
| Device name MH- plus 16 hex | Huntress, this campaign | High |
| Windows 10.0.19041.928 (ROADtools default), 10.0.19045.2006, 10.0.19045.0 or 10.0.26100 | Huntress | High with no hardware ids, else Medium |
| Device-8 hex, GraphSpy-Device, user + domain + 8 hex | Huntress, related clusters | Medium |
| DESKTOP- plus 8 or 6 characters | Huntress, related clusters | Low alone, Medium with an old build or no hardware ids |
| Two devices for one user within 10 minutes | Huntress saw a second device "within a minute" | Medium |
| Sign-in from one of the five published IPs | Huntress | High |
| python-requests, python-httpx, node, node-fetch, undici, axios, Dsreg/10.0 user agents | Huntress | High |
| AADSTS50199 on Microsoft Authentication Broker; device code sign-ins | Huntress; Microsoft | Medium |
Two medium signals on one device count as high. The score is a PlayCISO heuristic, not a verdict.
How to read the result
A device flagged High matches the campaign closely: confirm with its owner, then disable and delete it, revoke the user's sessions, reset their credentials and check their MFA methods and inbox rules, as Huntress advises. The checker matches published patterns, so an attacker who renamed the device would not match: also look at recent registered (Workplace) Windows devices with no Intune management. A real PC can carry a DESKTOP- name or an old build, which is why those count only in combination.
Then close the door: limit who can register devices, require MFA to register one, and block device code flow with the Device Code Phishing Blocker, which builds the Conditional Access policy and the KQL to hunt device code sign-ins. Rehearse the response in the Identity Compromise Response Checklist and the MFA Bypass Lab.
Sources
- Huntress: M365 device code phishing campaign leads to hundreds of rogue Entra ID registrations (3 Dec 2026)
- Microsoft Learn: Manage devices in Microsoft Entra ID (download devices, disable, delete)
- Microsoft Learn: device resource type (Microsoft Graph)
- Microsoft Learn: Authentication flows in Conditional Access
- Microsoft Learn: SigninLogs table
- Microsoft Learn: Microsoft Entra audit log activity reference
- Microsoft Learn: directoryAudit resource type
- Microsoft Learn: Remove-MgDevice
- Microsoft Learn: Revoke-MgUserSignInSession
Last reviewed 4 December 2026.
Frequently asked questions
Why does a rogue device survive a password reset?
Huntress says the attackers registered a device to obtain a Primary Refresh Token, and that password resets alone do not remove that access: the device has to be deleted in Entra ID. Microsoft says disabling a device revokes its Primary Refresh Token and any refresh tokens on it, and that deleting a device cannot be undone, so disable first, confirm with the user, then delete.
What device names did Huntress see?
Huntress reports names matching MH- followed by 16 hexadecimal characters (for example MH-51FB898341CEA47A), some reused in up to 24 organizations. In related clusters it lists DESKTOP- plus 8 characters (the ROADtools default), DESKTOP- plus 6 characters, Device- plus 8 hex characters, GraphSpy-Device, and user name plus domain plus 8 hex characters. DESKTOP- names are common on real PCs, so the checker only raises them when something else matches too.
Which export should I use?
The device list matters most. The Entra admin center's Download devices CSV has the registration date, OS version, join type and owner but no physicalIds column. Get-MgDevice in Microsoft Graph PowerShell can include physicalIds, which lets the checker see devices with no hardware identifiers. Sign-in and audit log exports are optional and add the IP, user agent and registration timeline.
Does this tool connect to my tenant?
No. It never contacts Microsoft or any other service. You run read-only exports yourself and paste or drop the files; they are read in your browser and never uploaded.
Who is behind the campaign?
Huntress does not tie it to a named threat actor. It notes some overlap with activity Microsoft attributed to Storm-2372 but says the overlap is not definitive.
How do I stop rogue device registrations?
Limit who can register and join devices and how many devices each user may have, require MFA to register or join a device, use Security Defaults where you do not have Entra ID P1, and block device code flow wherever possible with Conditional Access, which is Microsoft's own advice.
More tools like this
Related tools and labs, with new picks every day.