Hello @berketjune2012 , thank you for reaching out to us.
According to your ask:
- Can we use the same primary domain name by detaching and reattaching to the new domain?
Yes, you may use the same Domain after removing it from 1st tenant and verify it under different tenant.
2) what will happen to their resources in Azure. For example virtual machines that were part of the on premise AD Domain?
For answering this question i need to understand more about the ask:
- Is it tenant to tenant O365 migration? Kindly check the below article if it helps:
https://learn.microsoft.com/en-us/power-platform/admin/move-environment-tenant - If you are looking to transfer the subscription and resources to another tenant you may refer the below article:
https://learn.microsoft.com/en-us/azure/role-based-access-control/transfer-subscription - If you are planning to move O365 data, you may refer the article:
https://learn.microsoft.com/en-us/microsoft-365/enterprise/request-your-data-move?view=o365-worldwide
Please correct me if i am wrong in understanding your ask and help me in understanding more about it, you may also create a support request to get the detailed information on migration according to your environment.