Quick tip time. When attempting to authenticate with AAD when setting up a device in OOBE you might get the following error:

‘Looks like we can’t connect to the url for your organization’s mdm terms of use and invalid client’

The fix was simple, ensure the user who is signing in has an assigned licence for enrollment.