Skip to main content
Tobias Markwart
New Member
Nov 16, 2026 2:28 PM UTC
Question

"Invalid code" during Web Enrollment – Personally-owned Work Profile (Intune + AM API)

  • 2 replies
  • 23 views
  • Translate All • Beta, powered by Gemini

Hi everyone,

We use Microsoft Intune and Android Enterprise to manage Android devices.

 

We have encountered a problem. We have switched to the Android Management API (AM API) and now want to enrol personally-owned devices with a work profile via Web Enrollment.

 

After signing in to the Company Portal, the device starts to create the work profile, but then displays the message 'Invalid code', after which the enrolment process stops. The ADB logs show an HTTP 403 response with FAILURE_REASON_ENROLLMENT_TOKEN_INVALID.

 

In Intune, everything looks normal: the Managed Google Play connection shows 'Success', and there are no errors. We have also opened a case with Microsoft Support, but unfortunately we are not making any progress.

 

Has anyone encountered this issue before or knows what could be causing it?

Thanks in advance!

2 replies

Moombas
Level 4.4: KitKat
Nov 16, 2026 2:43 PM UTC

Even i don’t use Intune (luckily), did you check if the “device platform restricitions” fit as well, not limiting something which may kick in here? Like here: https://youtu.be/Hf6Z-9blvAE?list=PLRMmsp_xydxryW74yIJQbeL04MJJNKPbM&t=94

Translate • Beta, powered by Gemini
Android Enterprise Expert
Tobias Markwart
New Member
Nov 16, 2026 2:58 PM UTC

Yes, we have checked the device platform restrictions. Android Enterprise (work profile) is permitted for personally owned devices in our tenant.

According to the Microsoft documentation, the 'Personally owned' setting in the enrolment restrictions does not apply to devices managed by the Android Management API either. Therefore, we don't believe the restrictions are causing the problem. 

Translate • Beta, powered by Gemini