In order for Windows Autopilot device preparation to work, devices need to be able to enroll in Intune automatically. Enrolling devices in Intune automatically can be configured in the Azure portal:
In the Overview screen, under Manage in the left hand pane, select Mobility (MDM and WIP).
In the Mobility (MDM and WIP) screen, under Name select Microsoft Intune.
In the Microsoft Intune page that opens, under MDM user scope, select either All or Some:
If All is selected, all users can automatically enroll their devices in Intune.
If Some is selected, only users in the groups specified in the link under Groups can automatically enroll their devices in Intune. To add groups:
Select the link under Groups.
In the Select groups window that opens, select the desired groups to add. Make sure that the groups selected are Microsoft Entra user groups that contain the desired users.
Once all of the desired groups are selected, select Select to close the Select groups window.
In the Microsoft Intune screen, if any changes were made, select Save.
Next step: Allow users to join devices to Microsoft Entra ID
Plan and execute an endpoint deployment strategy, using essential elements of modern management, co-management approaches, and Microsoft Intune integration.
How to - Windows Autopilot device preparation user-driven Microsoft Entra join - Step 5 of 7 - Assign applications and PowerShell scripts to device group.