Aller au contenu

Intune: How to Fix Autopilot Device Removal Stuck in Microsoft Entra / Intune


Introduction

In some situations, you may encounter an issue where a Windows Autopilot device cannot be removed in Intune, even though management via Autopilot appears to be inactive. The « Remove » button is grayed out, and the object does not appear under Autopilot. This strange behavior particularly occurs with Hybrid Azure AD Join devices.

In this article, we will detail the steps required to solve this problem using Microsoft Graph Explorer

Issue

When you try to remove a device, Intune displays a message

"This device is a Windows Autopilot device. Devices deployed with Windows Autopilot cannot be removed in the Microsoft Entra Admin Center."

However, when checking the Autopilot section, the device does not appear. This behavior may be caused by a desynchronization or an object management problem.


Solution: Deletion via Microsoft Graph Explorer

Step 1: Identify the device object ID

  1. Render
  2. Find the affected device and note its Object ID .

Step 2: Use Microsoft Graph Explorer to find the object

  1. Go to [Microsoft Graph Explorer]
  2. Log in with an account that has Global Admin and Device.ReadWrite.All permissions .
  3. Perform a query GET using the device object ID: https://graph.microsoft.com/v1.0/devices/{ObjectID} Replace {ObjectID} with the copied ID.
Solution: Deletion via Microsoft Graph Explorer

Step 1: Identify the device object ID

Render

Find the affected device and note its Object ID .

Step 2: Use Microsoft Graph Explorer to find the object

Go to [Microsoft Graph Explorer]

Log in with an account that has Global Admin and Device.ReadWrite.All permissions .

Perform a query GET using the device object ID: https://graph.microsoft.com/v1.0/devices/{ObjectID} Replace {ObjectID} with the copied ID.

Step 3: Check the results

  • If the object still exists, it will be returned by the query.
  • This confirms that the device is still registered in Entra, even if it does not appear in the GUI.

Step 4: Delete the object with a DELETE query

  • Replace the method GET with DELETE in Graph Explorer.
  • Run the query to permanently delete the object: DELETE https://graph.microsoft.com/v1.0/devices/{ObjectID}
  • If the deletion is successful, you will see a response with the code 204 - No Content.

Conclusion

This Autopilot device deletion issue in Intune is unusual but can be resolved effectively via Microsoft Graph. By following these steps, you can work around the limitations of the GUI and clean up the problematic objects in your Azure AD environment.

If you have any further difficulties, please ensure that your account has the necessary permissions and that your request is correctly formulated.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *