Unable to delete a domain

OzDownUnder 156 Reputation points
2022-12-20T08:52:41.257+00:00

I'm trying to delete a domain from my tenant and have followed these instructions: https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/sign-in/unable-remove-domain-office-365 to confirm that:

  1. there are no user names in that domain
  2. There are no email addresses with that domain

When I go to the Azure portal: https://portal.azure.com/#view/Microsoft_AAD_IAM/DeleteDomainBladeV2/domainName/<mydomain>.onmicrosoft.com it shows me three ticks under Meets requirement? When I then click Delete I get this error:

Unable to delete domain name <domain>.onmicrosoft.com from <companyname>

Request Id: cf2cc60f-1e0b-40c1-825f-1f34bfb89db1
Time Stamp UTC: 2022-12-20T08:50:47
Code: Request_BadRequest
Message: Domain deletion attempt failed.

Note that this domain is not the initial domain for this tenant and was added as an additional domain for testing.

Not sure what I'm doing wrong.

Microsoft Security Microsoft Entra Other
{count} votes

3 answers

Sort by: Most helpful
  1. Sandeep G-MSFT 20,906 Reputation points Microsoft Employee Moderator
    2022-12-21T08:34:38.33+00:00

    @OzDownUnder

    Thank you for posting this question in Microsoft Q&A. I have looked at the backend logs based on the request ID that you have shared. I see below error at backend while domain deletion process.

    Domain XXXXXXX.onmicrosoft.com cannot be removed due to existing Microsoft Online Email Routing Address capability.

    The domain can't be removed because it's still enabled for email. The customer should be able to resolve this by removing the domain from 'accepted domains' for Exchange:
    This can be done via Powershell: https://learn.microsoft.com/en-us/powershell/module/exchange/remove-accepteddomain?view=exchange-ps
    It can also be done via EAC: https://learn.microsoft.com/en-us/Exchange/mail-flow/accepted-domains/accepted-domain-procedures?view=exchserver-2019#remove-accepted-domains

    Do let me know if you have any further questions.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

  2. OzDownUnder 156 Reputation points
    2023-01-02T22:02:06.683+00:00

    @Sandeep G-MSFT , I'm trying to remove the domain but it seems like this option is not available in Exchange Online. The links above seem to be for Exchange On-prem. In Exchange Online the remove domain option is not available:

    275470-image.png


  3. Arun Manickam 0 Reputation points
    2024-04-06T12:44:07.37+00:00

    After breaking my head for 5 hours, I got the following answer from MS troubleshooting.

    Basically you cant delete the custom domain. you have to create a new tenant and move the sub.

    :(

    If you have mistakenly created a Microsoft Entra tenant with an initial .onmicrosoft.com domain such as myname.onmicrosoft.com and wish to update it to a friendlier company name like contoso.onmicrosoft.com, you can configure a new Microsoft Entra tenant and associate your subscriptions with the targeted tenant

    0 comments No comments

Your answer

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