This is something that I have discovered while reading documentation, to it could be useful to help to reset a tenant and recover an initial situation:
You can ForceDelete a domain name in the Azure AD Admin Center or using Microsoft Graph API. These options use an asynchronous operation and update all references from the custom domain name like “email@example.com” to the initial default domain name such as “firstname.lastname@example.org.”
To call ForceDelete in the Azure portal, you must ensure that there are fewer than 1000 references to the domain name, and any references where Exchange is the provisioning service must be updated or removed in the Exchange Admin Center. This includes Exchange Mail-Enabled Security Groups and distributed lists. Also, the ForceDelete operation won’t succeed if either of the following is true:
- You purchased a domain via Microsoft 365 domain subscription services
- You are a partner administering on behalf of another customer organization
The following actions are performed as part of the ForceDelete operation:
- Renames the UPN, EmailAddress, and ProxyAddress of users with references to the custom domain name to the initial default domain name.
- Renames the EmailAddress of groups with references to the custom domain name to the initial default domain name.
- Renames the identifierUris of applications with references to the custom domain name to the initial default domain name.
An error is returned when:
- The number of objects to be renamed is greater than 1000
- One of the applications to be renamed is a multi-tenant app