Is there a way to query the AD domain of a VM on azure using the REST API? The only way I found was to use a run command and use powershell on the VM to get the domain name, this however has a significant delay and I would like to find a faster method.
Run Command documentation: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/run-command
You can check the role assignments of the VM using
See: https://learn.microsoft.com/en-us/rest/api/authorization/roleassignments/listforresource#roleassignment