Registering devices with Intune for management and policy enforcement
Query the old record by its exact Intune managedDeviceId; delete it only if Microsoft Graph returns that resource and its ID differs from the active enrollment—if Graph also returns 404, open an Intune support case because no managed-device object remains for an administrator to delete.
1. Preserve the active enrollment identifiers
Open the accessible, current record under Intune admin center → Devices → All devices and record:
- Intune managed-device ID
- Microsoft Entra device ID
- Serial number
- Device name
- Last check-in time
The Intune managed-device ID and azureADDeviceId are different identifiers; Graph exposes azureADDeviceId as a property of the managed-device resource.^1^
For the inaccessible row, obtain its managed-device ID from the GUID in the browser address when opening that row, if present. Do not proceed if the only available identifier cannot distinguish the old record from the active one.
2. Test whether the old Intune resource still exists
In Microsoft Graph Explorer, sign in with an administrator account and issue:
GET /v1.0/deviceManagement/managedDevices/{oldManagedDeviceId}
Accept: application/json
Interpret the result as follows:
-
200 OK: A managed-device resource still exists. Compare itsid,azureADDeviceId, serial number, and last check-in information with the values recorded for the active enrollment. -
404 Not Found: The backend managed-device resource is already absent. A DELETE request against the same ID cannot remove the remaining portal row. -
403 Forbidden: Resolve Graph permissions before interpreting the result. Intune managed-device deletion requires an active Intune tenant license andDeviceManagementManagedDevices.ReadWrite.All; personal Microsoft accounts aren't supported.^2^
3. Delete through Graph only when the old resource exists
If the GET returns the obsolete object and confirms it is not the current enrollment, submit:
DELETE /v1.0/deviceManagement/managedDevices/{oldManagedDeviceId}
Authorization: Bearer {token}
Accept: application/json
A successful deletion returns 204 No Content.^2^
Risk: Deleting a Windows managed-device object triggers a Retire operation. Deleting the active ID could therefore affect its Intune management state; Microsoft also advises preserving required BitLocker recovery information before retiring or deleting a Microsoft Entra-joined Windows device.^3^ Do not select records by name alone.
If Graph also returns 404
This indicates that both the portal detail request and Graph cannot resolve the old managed-device resource. The supplied evidence does not establish whether the remaining row is caused by caching, replication, or another portal-index inconsistency, but there is no supported object-level DELETE operation left to run.
Open a case from:
Intune admin center → Troubleshooting + support → Help and support → Intune → Contact support
Include:
- Old managed-device ID and its 404 response
- Active managed-device ID
- Microsoft Entra device IDs for both, if available
- Serial number and device name
- Screenshot of the stale row
- Date/time and Graph request ID from the 404 response
Microsoft documents this support path and recommends including identifiers, serial number, model, OS version, and timestamps.^4^
Keep the three record types separate
A reset and re-enrollment can create another device object even when the name or serial number is unchanged.^5^ Check each service independently:
- Intune managed device: Relevant to the stale row and the Graph endpoint above.
- Microsoft Entra device: Remove only if a separate obsolete Entra object is positively identified. Microsoft recommends retiring an MDM-controlled device before disabling or deleting its Entra identity, and Entra deletion is irreversible.^6^
- Windows Autopilot registration: OOBE enrollment with automatic MDM enrollment does not by itself establish that this device was registered with Autopilot. Only use Autopilot deregistration if the serial number is actually present under Devices → Windows → Enrollment → Windows Autopilot → Devices. Microsoft warns that removing Autopilot, Intune, and Entra records out of order can create orphaned records or enrollment problems.^7^
Intune device cleanup rules are not a permanent-delete mechanism: they hide inactive records without wiping or retiring devices, and they don't remove corresponding Microsoft Entra objects.^8^ They are therefore unsuitable for repairing a row whose resource already returns 404.
References