Thank you for your post and I apologize for the delayed response!
From your issue and screenshot, I understand that you're trying to keep your Primary domain example.onmicrosoft.com
and remove the mynameexample.onmicrosoft.com
domain from your Azure AD domain list. Unfortunately, once the onmicrosoft.com domain is added, it can't be removed. For more info.
Note: Azure Active Directory (Azure AD) tenants come with an initial domain name, <domainname>.onmicrosoft.com. You can't change or delete the initial domain name, but you can add your organization's names.
You can't remove your onmicrosoft.com domain. Microsoft 365 needs to keep it around because it's used behind the scenes for your subscription. But you don't have to use the domain yourself after you've added a custom domain. If you choose to create a new onmicrosoft.com domain, it cannot be removed. You are limited to five onmicrosoft.com domains in your Microsoft 365 environment, so make sure to check for spelling and to assess your need if you choose to create a new one.
Our engineering team is currently aware of this limitation and has a backlog item to look into this.
I hope this helps!
Additional Links:
- Delete a custom domain name
- ForceDelete a domain name
- Add your custom domain name using the Azure portal
- Error when attempting to delete *.onmicrosoft.com domain from my tenant
If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.