Description
Describe the bug
When offboarding, both Entra and Intune works, but the device stays in Autopilot
To Reproduce
I have cleaned our Intune for approx. 40 devices using the tool and every time, the device is correctly removed from Intune and Entra, but nothing happens in Autopilot. In the log it appears that the application is not even attempting to remove the device from Autopilot.
I am running the application with user login with Intune Administrator rights.
The logs do create an error with authorization, but that is for the BitLocker keys.
Expected behavior
Expect the device from being removed in alle three areas
Screenshots
...
Additional context
Log file from an offboarding:
{"error":{"code":"authorization_error","message":"Failed to authorize, token doesn't have the required permissions.","innerError":{"date":"2025-01-24T08:20:51","request-id":"4be286a8-9633-422c-a0ef-a31eefea53a6","client-request-id":"0fd47f95-4495-49c5-82ef-43a76816321b"}}}
2025-01-24 09.20.50 - Successfully removed device from Entra ID.
2025-01-24 09.20.51 - Successfully removed device from Intune.
2025-01-24 09.20.51 - Successfully removed device from all services it was found in.
2025-01-24 09.21.40 - Searching for devices:
2025-01-24 09.21.52 - Error in pagination: GET https://graph.microsoft.com/beta/informationProtection/bitlocker/recoveryKeys?$filter=deviceId%20eq%20'be62bde2-666a-4f8d-8436-94e678996b45'
HTTP/2.0 403 Forbidden
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
request-id: 63d9cd56-64ed-4da5-a4bd-e39badfc947f
client-request-id: c0a059dc-1ff6-4013-950c-d81137b9bca1
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"FR2PEPF000008CA"}}
Date: Fri, 24 Jan 2025 08:21:56 GMT
Content-Type: application/json
Content-Encoding: gzip
Activity