GraphAPI Powershell - Delete Azure AD Device that is assosiated with non-existant autopilot record

ChristopherCoates 41 Reputation points
2022-08-25T01:03:40.257+00:00

I have several devices that were previous part of our Windows Autpilot infrastructure. The Autopilot record has been deleted which should have removed the AAD device record (or at a minimum, allow deletion of the device)

I have tried to run several Graph powershell commands but the API keeps returning errors like device is not found.

Can anyone provide the appropriate commands to delete this record from my AAD.

234607-image.png

Cheers

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
Windows Autopilot
Windows Autopilot
A collection of Microsoft technologies used to set up and pre-configure new devices and to reset, repurpose, and recover devices.
441 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,631 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Givary-MSFT 30,931 Reputation points Microsoft Employee
    2022-08-25T05:31:22.94+00:00

    Hi @ChristopherCoates Thank you for reaching out to us.

    As I understand you are delete a device from Azure AD which is tagged as Windows Autopilot device.

    Researched on your issue and found this article https://www.prajwaldesai.com/delete-windows-autopilot-device-from-azure-ad/#:~:text=1%20First%20login%20to%20Microsoft%20Endpoint%20Admin%20centre,take%20a%20few%20minutes%20to%20complete.%20More%20 which has the steps to delete the device from Azure AD.

    Let me know if this article helps to resolve your issue or not.