This error code is caused by the Device Enrollment restriction policy in place. You need to check and make sure Personally owned devices are allowed for Windows (MDM) in the Device Enrollment restriction policy.
Login on Microsoft Intune admin Center.
Click on Devices -> Enroll Devices -> Enrollment restrictions.
Edit the Policy which is applied to the users. If there is only one default policy, edit that one.
Edit Platform settings.
Check to confirm if Windows (MDM) Platform is allowed or blocked.
If Windows (MDM) Platform is set to Block in the personally owned column then select Allow and then click on Review + Save.
Try to join the machine to Azure Active directory via any method and this time there should not be any issues.
See also: