If the device has already been joined in Microsoft Entra ID/Azure AD, the official supported method for Intune auto-enrollment is to use a provisioning package: Bulk join a Windows device to Azure AD and Microsoft Endpoint Manager using a provisioning package – Microsoft Community Hub
Alternatively, you can use a Powershell script to enroll the devices. There isn't an official sample available for this but there are some examples of this online, like this one.
Let me know if this helps and if you have additional questions.
Additional resources:
If the information helped you, please Accept the answer. This will help us as well as others in the community who may be researching similar questions.