Home » Blog » Office 365 » Remove Domains from Microsoft 365 Tenant with Ease
Office 365

Remove Domains from Microsoft 365 Tenant with Ease

  author
Published By Mohit Jha
Nimisha Ramesh
Approved By Nimisha Ramesh
Published On March 30th, 2026
Reading Time 6 Minutes Reading

Don’t know how to remove a domain from Office 365 tenant? Start by clearing user email aliases and group dependencies.

When admins read the official Microsoft documentation, they get the impression that domain removal is a quick 5-minute process. All they need to do is go to the admin center and press the button.

If only it were that easy.

Domain removal is an activity associated most often with scenarios like corporate rebrand, post-acquisition cleanup, or environment consolidation.

So it requires utmost scrutiny, as a single missing user alias can toggle the “Domain is still in use” error. No need to worry, I have helped countless admins successfully remove unwanted domains from M365 tenants, and will do the same for you.

Follow this guide to avoid the common mistakes, and soon the task that seemed impossible will become super easy.

Let’s start by discussing some precursor steps that Microsoft doesn’t tell you.

Table of Contents Hide

What to Do Before Removing a Domain from an O365 Tenant?

Don’t rush to delete a domain in the Admin center or launch a PowerShell instance. Do this instead:

Check for UI Dependency (GUI): Use your credentials to log in to the Admin center, then go to Settings > Domains. Choose the domain you want to remove. Right then and there, the Admin Center will show you the list of elements blocking the removal. Admins sometimes miss nested aliases or distribution list members. If you are dismantling these groups during the domain removal, ensure you have an alternative way to forward Office 365 emails to multiple users.

Audit Dependencies via PowerShell: If you are comfortable with scripting, PowerShell is an excellent alternative to identify the blockers with both speed and accuracy. Open an instance and type:

Get-Recipient | Where-Object {$_.EmailAddresses -match "olddomain.com"} | Select-Object Name, RecipientType, EmailAddresses

This simple yet powerful command will expose every user, shared mailbox, distribution group, and mail contact holding onto that domain. Not only that, but it will reveal any secondary SMTP aliases that the UI hides.

Inspect Azure AD (Entra ID) App Registrations: Sometimes a domain won’t remove because it’s connected to an Enterprise Application. So check and remove accordingly.

Verify On-Premises Sync Status: If you maintain a hybrid system, you cannot just orphan a domain in the cloud. You must verify the UPNs in your local AD environment, too. Skipping this means the next Delta Sync will just push the old domain right back into O365, causing sync errors.

Now that the pre-work is done, let’s get to the actual removal step by step.

How to Remove a Domain from Microsoft 365 Tenant via Admin Settings

Those admins who prefer a visual interface using the Microsoft 365 Admin Center find it the most straightforward approach.

  1. Bulk Move Users:
  • Sign in to the Microsoft 365 admin center > Users > Active users.
  • Select the users (old domain).
  • Click the Change domains option at the top.
  • Select the new domain (if available) and press Save.
  1. Update Groups:
  • Go to Teams & groups > Active teams & groups.
  • Click each group one by one and go to the General tab.
  • There, edit the Primary email address to reflect the new domain.
  1. Delete the Domain:
  • Once every dependency is in the clear, navigating how to remove the domain from the O365 tenant is simple.
  • Just click Settings > Domains.
  • Pick the old domain and click Remove domain.

The manual method isn’t recommended if you are about to combine two Office 365 tenants.

Steps to Automate Domain Removal in M365 with PowerShell

In case you are dealing with a massive enterprise environment containing hundreds (if not thousands) of users, clicking through the UI is too time-consuming. Instead, use PowerShell, which is a highly efficient alternative to the UI method.

To Bulk Update Users, enter this script:

$sourceDomain = "olddomain.com"
$targetDomain = "newdomain.com"
$users = Get-MgUser -ConsistencyLevel eventual -Filter "endswith(userPrincipalName,'@$sourceDomain')" -All
foreach ($user in $users) {
$newUPN = $user.UserPrincipalName.Replace("@$sourceDomain", "@$targetDomain")
Update-MgUser -UserId $user.Id -UserPrincipalName $newUPN
}

To remove the M365 Domain type:

Remove-MgDomain -DomainId "olddomain.com"

Also Read: Steps to migrate an Office 365 shared mailbox to a user mailbox

Best Practices for a Safe Office 365 Domain Removal

If you are not careful, there is a chance that you will lock yourself out of the tenant. That’s why it’s always recommended to create a breakglass Global admin account directly in the .onmicrosoft.com domain as a safety precaution.

Admins are often aware of the user list, but sometimes miss out on the legacy distribution list, like info@ or sales@. Don’t make that mistake.

Perform the deletion process when there are no active logins; there is a chance that the user might lose critical data.

Use a utility like FreeViewer Office 365 Tenant Migration Tool to shift all critical user data to a safe, different tenant/domain before the deletion.

Download Now Purchase Now

You can get a free demo version of the software today.

Update all MX records at your DNS registrar to point to a new host. Otherwise, inbound emails will continue to point towards the old domain and will bounce with an NDR (Non-Delivery Report).

Additionally, if you plan to quit the tenant, transfer your Office 365 subscription to another account. Only then should you decommission the tenant.

Conclusion

Now you know how to remove a domain from an Office 365 tenant. The task itself isn’t that difficult. The real problem is accurately identifying all the connections that a domain might have inside a tenant. Once you can sever those connections, the removal part takes minutes. One important thing that an admin should be mindful of is the proper transfer of all user data. For that, it is best to use a tool that is purpose-built.

Frequently Asked Questions

Q: How long does domain removal actually take?

5 minutes only when your domain is an orphan. Meaning that it is not connected to any Security groups, Distribution lists, Users, Aliases, Shared mailboxes, Resource mailboxes, or Microsoft 365 groups.

Q: When should I remove the Domain in the O365 tenant?

Friday evening, or over a long weekend when there is little to no activity. This is to allow the DNS propagation to completely set in, which takes around 48 hours to complete, give or take.

Q: Are there any limits on how many domains I can remove in a particular time?

There is no mention of such a limit anywhere in the official documentation or any user forums. However, I would recommend that you exercise caution and do the removal in batches. A sudden removal of 10,000 users from a domain may be perceived as a cyber attack and trigger Microsoft’s safety protocols. So your tasks might get stuck midway.

Q: Can I force the removal of a domain?

Not in the GUI but in PowerShell, you can add a Remove-MgDomain to push the system. However, even this won’t work unless you have made the disconnections first.

Why Choose FREEVIEWER?

3M+

Happy Clients

250+

Products

100+

Countries

15+

Years of Experience