Closed SRE93 closed 6 years ago
Hey, does that device still exists? If you do a GET to https://graph.microsoft.com/Beta/deviceManagement/managedDevices/b05dcb23-0a67-4971-864d-59981906640d Do you receive the information about that device?
Bad requests are usually triggered when the resource that you are trying to access does not exist. I believe that device is already deleted and that is why you can't delete it any more.
Hey, device is still present in Azure Intune Portal and when using
Invoke-RestMethod -uri https://graph.microsoft.com/Beta/deviceManagement/managedDevices/b05dcb23-0a67-4971-864d-59981906640d -Headers $authToken
id : b05dcb23-0a67-4971-864d-59981906640d
...
Additionally: The devices are macOS devices registered by Jamf Cloud relationship between Intune and Jamf Pro.
It looks like the way the delete is called has been updated in the beta endpoint, I will update the sample script.
Hi @dernettemann118
Apologies for the late response on this, does the delete work if its a non MacOS devices registered by Jamf? I looked at the sample again and the call in the script is correct.
Another question is if you look at the MacOS device in the UI is the delete option available?
Thanks
Dave
Hi @dernettemann118, if you have an update here please reopen the issue.
Hey, when trying to delete a device from intune through invoke-deviceaction got a bad request error: