Using Ansible playbook to automate deployment of Azure virtual machines. How to automatically enroll new VMs in Intune?

Our department has used Ansible playbooks to successfully automate deployment of Azure virtual machines previously. We have a new use case where we need to adapt existing playbooks to deploy Azure VMs that are Entra ID joined only (not domain joined, not hybrid joined) and automatically enroll those VMs in Intune.

Would any Ansible experts be able to advise on how we should proceed?

For additional context: I didn’t find references to Intune in the documentation for Azure.Azcollection. When researching options, I found Terraform code that may be relevant to our use case, but nothing related to Ansible.

Our current theory involves the AADLoginForWindows Azure module and azure.azcollection.azure_rm_virtualmachineextension.