HomeNewsletterCommunityToolsArchiveBlogToday's NewsAboutServicesQuick Links Subscribe free
← Back to Blog

Deregister an Autopilot Device Out of Order and You Can Orphan It Permanently

IA
Imran Awan
22 July 2026

A laptop dies. You delete it from Entra ID because that felt like the obvious "remove this device" button. Three weeks later a replacement device with the same serial number refuses to enrol through Autopilot, the record is stuck, and Microsoft support asks you exactly which order you did things in. There is a correct order. Most people never learn it because it never comes up — until the one time it does.

This post walks through what Windows Autopilot registration actually is, why deregistering a device is a three-system operation rather than a single delete button, and gives you a PowerShell script that checks a device's real status across Autopilot, Intune, and Entra ID in one call — so you know exactly what state a device is in before you touch anything.

The problem — deleting the wrong thing first can leave a device permanently stuck

Windows Autopilot registration is not one action. It is two separate things that both have to be true at once:

  1. The device's unique hardware identity — its hardware hash — has been captured and uploaded to the Windows Autopilot service.
  2. That hardware hash has been associated with your organisation's Entra tenant ID.

When a device registers successfully, Windows Autopilot automatically creates a Microsoft Entra device object for it. The Autopilot deployment process needs that object to identify the device before anyone signs in. This is the part that catches people out: if you delete the Entra device object manually, out of order, the device can end up in a state where Windows Autopilot can no longer recognise it, but the old registration hasn't been cleanly removed either. Support calls this an unrecoverable device state, and it is exactly as unpleasant to fix as it sounds.

Straight from Microsoft's own guidance: "Avoid manually deleting the device from Microsoft Entra ID." For Entra-joined devices, once you deregister correctly through Intune, no further action in Entra ID is needed or wanted. For hybrid-joined devices, you delete the computer object from on-premises Active Directory instead — never from Entra ID directly.

Why it happens — three systems, one device, and no single "delete" button that covers all of them

A registered Autopilot device touches three separate systems, and each one needs to be handled in the right order:

These three records are linked, but deleting one does not automatically clean up the others in a predictable way. Microsoft's own documentation is explicit that the correct order is Intune first, then Autopilot — never Entra ID directly, and never Autopilot before Intune.

Terminology worth locking down before you go further: "Device registration" is associating a hardware hash with the Autopilot service. "Adding a device" also associates it to your tenant ID. "Enrolling a device" means adding it to Intune. These sound interchangeable in casual conversation and are not the same thing — a device can be registered with Autopilot for months before anyone ever enrols it.

There is also a portal-level gotcha that trips up a lot of admins the first time they go looking for a device. In the Intune admin center, Devices > Windows > Windows devices is not the same list as Devices > Enrollment > Windows > Windows Autopilot > Devices. A device only appears in the first list once both the Autopilot registration succeeded and a licensed user has actually signed in on it. If you're looking for a device that's registered but has never been through Out-of-Box Experience, you won't find it in "Windows devices" at all.

How to verify — check what state a device is actually in before you touch anything

Before deregistering, deleting, or troubleshooting a device, confirm its current state across all three systems. Don't assume — a device that looks "stuck" in one portal might already be perfectly healthy in another.

PowerShell 7 — manual spot-check
# Quick manual check against a single serial number before running the full script $serial = "PF3ABC12" Get-MgDeviceManagementWindowsAutopilotDeviceIdentity -Filter "contains(serialNumber,'$serial')"
Gotcha: the Autopilot service's server-side $filter on serial number has historically been unreliable for some tenants and API versions — an exact-match filter can return a BadRequest error even with correct syntax. If that happens, pull the full device list with -All and filter client-side in PowerShell instead. The full script below does this defensively so you don't hit the same wall.

The fix — the correct deregistration order, step by step

This is the exact sequence Microsoft documents for permanently removing a device — for example, one that's been retired, sent for repair and replaced, or reached end of life.

Step 1 — Delete the device from Intune first

Intune Admin Center — Devices
  1. Sign in to the Microsoft Intune admin center.
  2. Select Devices in the left pane.
  3. Under By platform, select Windows.
  4. Find the device under Device name and select it.
  5. Note the serial number shown on the device properties page — you'll need it in Step 2.
  6. Select Delete in the toolbar.
  7. Confirm the deletion when the warning dialog appears.
Tip: writing down the serial number in step 5 is not optional busywork — once the device is deleted from Intune, the fastest way to find it again in the Autopilot devices list is by that exact serial number.

Step 2 — Deregister the device from Windows Autopilot

Intune Admin Center — Windows Autopilot Devices
  1. Confirm the device is already deleted from Intune (Step 1).
  2. Go to Devices > Windows > Windows devices, then under Device onboarding select Enrollment.
  3. Under Windows Autopilot, select Devices.
  4. Find the device by its serial number using Search by serial number.
  5. Select the device's checkbox, then the menu on that row.
  6. If Unassign user is available (not greyed out), select it and confirm.
  7. With the device still selected, select Delete in the toolbar and confirm.
  8. Select Sync to accelerate the deregistration, then Refresh every few minutes until the device disappears from the list.
Do not skip the order above. Removing records out of sequence — or deleting the Entra device object manually at any point — can leave the device in an unrecoverable state. If that happens, you need to contact Microsoft support; there's no self-service fix.

What to do afterwards, depending on join type

Join typeExtra step needed
Microsoft Entra joinedNone. Do not manually delete the device from Entra ID.
Microsoft Entra hybrid joinedDelete the computer object from on-premises Active Directory to stop it re-syncing to Entra ID. No further Intune or Autopilot action needed.

Other portals that can deregister a device

Two other portals can also deregister a device from Windows Autopilot, but neither performs the full cleanup:

Gotcha most partners hit at least once: deregistering a device in Partner Center only removes the Autopilot registration. It does not unenrol the device from Intune or disjoin it from Entra ID — the customer's IT admin still needs to run the full Intune-then-Autopilot sequence above. Also: if a device was originally registered through Intune or the M365 admin center rather than MPC, it won't show up in Partner Center's device list at all. To register it there instead, it has to be deregistered first using the standard process.

Proof it worked — confirm the outcome across all three systems, not just one

Microsoft's documentation is specific about one thing people get wrong after deregistering: the Entra device object's fate depends on whether the device was ever enrolled in MDM.

Device historyWhat happens to the Entra device object
Never enrolled in MDMRemoving the Autopilot registration can also remove the Entra device object.
Is or was enrolled in MDMThe Entra device object is not automatically deleted — it can remain even though Autopilot registration is gone.

This is exactly why "it's gone from the Autopilot list" isn't proof that cleanup is complete. Run the check below both before and after deregistering, so you have a real before/after comparison instead of assuming.

Download the script — GitHub

Get-AutopilotDeviceRegistrationStatus.ps1 is free and open source. It checks Autopilot registration, Intune enrollment, and the Entra device object for one serial number, in a single read-only call.

Get-AutopilotDeviceRegistrationStatus.ps1 View full repo →
PowerShell 7 — real output pending
# This section will be updated with the real captured output once the script has been # run and confirmed against a live tenant. Placeholder removed after testing. .\Get-AutopilotDeviceRegistrationStatus.ps1 -SerialNumber "PF3ABC12"
Note: this script only reads data from Autopilot, Intune, and Entra ID. It makes no changes anywhere. Run it before and after any deregistration to get a genuine before/after comparison instead of guessing at what happened.

References

Share this post
LinkedIn X / Twitter Reddit Bluesky

More from EndpointWeekly

Autopilot
Windows Autopilot: Complete Device Lifecycle Management Guide
The full deployment lifecycle from registration through retirement, with the deployment modes and ESP explained.
Intune
How to Look Up a Windows Autopilot Device by Serial Number Using PowerShell
A single-lookup companion script for checking one device's Autopilot registration status fast.
Autopilot
Windows Autopilot Enrollment Failures: A Structured Troubleshooting Guide
A systematic approach to diagnosing enrollment failures once a device is registered but won't provision.