How to delete custom domain name from Azure Active Directory

Sergej Ostashchuk 5 Reputation points
2023-04-11T23:05:05.07+00:00

Hello,

Question: is there any working solution to how to delete custom domain name from Azure Active Directory ? I know, there are many similar questions here and on other sites. I did research, but was not able to find useful response nor working solution.

Details:
Azure Active Directory (Free)
A custom domain added: abcdef.onmicrosoft.com
Domain is not used by any user, group nor application.
Want to delete the custom domain via Azure portal. All checks passed successfully.
Tried multiple times, always the same error.
I also tried a few PowerShell modules, but also unsuccessfully.

Any idea or successful experience ?

Thanks in advance !

custom-domain-1

custom-domain-2

custom-domain-3

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Durkan 12,251 Reputation points MVP
    2023-04-12T07:23:15.0633333+00:00

    Hi

    you can't remove the onmicrosoft.com domain from your account - this is the default account created for your tenant and is used in the background by Microsoft to identify your domain to their services.

    https://learn.microsoft.com/en-us/microsoft-365/admin/get-help-with-domains/remove-a-domain?view=o365-worldwide#still-need-help

    Hope this helps,

    Thanks

    Michael Durkan

    • If the reply was helpful please upvote and/or accept as answer as this helps others in the community with similar questions. Thanks!

  2. JamesTran-MSFT 37,221 Reputation points Microsoft Employee Moderator
    2023-04-12T19:38:07.6466667+00:00

    @Sergej Ostashchuk

    Thank you for your post and follow-ups!

    From your issue and screenshots, I understand that you're trying to delete/remove your bcdef.onmicrosoft.com domain since it isn't being used by any users or applications.

    Unfortunately, this is a known issue when it comes to the "onmicrosoft.com " domains where you can’t rename or remove existing onmicrosoft.com domains after they're created. You can replace your initial onmicrosoft.com domain (mynamemysurnamemycompanylongname.onmicrosoft.com) after sign-up, but if you create additional onmicrosoft.com domains within your Azure AD tenant those can't be removed.

    Note: You are limited to five onmicrosoft.com domains.

    User's image

    For more info - Why do I have an "onmicrosoft.com" domain?

    If you want to have your email look like ******@contoso.com: buy the domain or just follow the steps in Add your users and domain to Microsoft 365 if you own it already.

    You can replace your onmicrosoft.com domain after sign-up. While you can’t rename or remove an existing onmicrosoft.com domain, you can create a new one and make it your default onmicrosoft.com domain (your “fallback domain”). For example, if the initial domain you chose was fourthcoffee.onmicrosoft.com, if needed you can create a new onmicrosoft.com domain called fourthcoffeecorp.onmicrosoft.com and set it to be your fallback domain.

    You might not be able to change your SharePoint domain name. Your SharePoint domain name is based on your onmicrosoft.com domain name. The ability to change the SharePoint domain name is available in public preview for organizations whose total SharePoint sites and OneDrive accounts number fewer than 1000.

    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.

    I hope this helps!

    If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.


    Additional Links:


    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.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.