Invalid_client error during autopilot enrollment

Issue:

Autopilot enrollment of Windows 10 machine fails after user enters their credentials with the following error message.

Something went wrong
Looks like we can’t connect to the URL for your organization’s MDM terms of use. Try again or contact your system administrator with problem information from this page.

Additional problem information:
Error: invalid_client
Error subcode:
Description: failed%20to%20authenticate%20user

Cause:
The user does not have access to the Intune service (user is either not licensed or service is turned off).

Resolution:
Ensure user has a license assigned that enables Intune access, this is inlucded in the following licenses:

  • Enterprise Mobility + Security E3
  • Enterprise Mobility + Security E5
  • Intune

Ensure that the Intune service is turned on in the license
image