Read time: 7 minutes
Summary: Removing a domain from Microsoft Office 365 involves moving users to the new domain, migrating groups, and then finally navigating to the Admin center to remove domain from Microsoft 365. Windows PowerShell is primarily used to remove users in bulk from the old domain. This process must be executed carefully to make sure no users or groups are left behind.
A domain name is a unique identifying address that appears along with @ in the email address. As a web address, it appears with www. Typically, the domain name takes the form of an organization or university and appears as companyname.com and universityname.edu and all the Office 365 users have at least one domain attached to their accounts.
But sometimes, when the user has multiple domains in a single Office 365 account, then he/she needs to remove some domains when they are consolidating their subscriptions, or changing or canceling their subscriptions. And we are going to show the procedure in the article.
You cannot remove the domain instantly, but multiple steps are required for the complete removal of a domain from the account.
NOTE: You cannot delete the onmicrosoft.com domain from the account.
Remove Domain from Microsoft 365 using Admin Center
The process to remove domain from Office 365 tenant has three stages. First, all the users are shifted to the new domain, then groups are moved the new domain, and finally the domain is removed. Let’s see the process in detail below.
Stage 1: Move the users to another domain.
First, you need to disenfranchise the user from the domain by changing their domains. Here are the steps;
- Go to Office 365 Admin Center and go to Active Users in the Users category.

- Choose the user account whose domain you want to change. Click More option (…) and choose Manage username and email.

- Click the Edit icon to change the domain name.

- Use the dropdown menu and select the new domain address for the account. Click Done.

- At the Change Domains page, choose a different domain.
Stage 2: Move the groups to another domain
- In the Office 365 Admin Center, follow Groups>Groups page.

- Choose the Group and click Edit Email Addresses.

- Click the Edit icon in front of Primary email address.

- Choose a different domain address from the drop-down and click Done.

Stage 3: Remove the old domain
- In the Office 365 Admin Center, click Settings>Domains page.

- Choose the domain, click the option in front of it and click Remove domain.

- Click Remove.
- Follow the instructions and finally, click Close.
It will take up to 5 minutes for the complete deletion of the domain from Office 365 if it is not associated with multiple places such as groups, security groups, users, distribution lists, etc. In this case, it may take many hours for the complete deletion of the domain.
Remove Multiple Users From the Domain using PowerShell
If you want to delete multiple users from the domain, then you should use the Exchange Management Shell cmdlets to delete the multiple domains.
- First, start the Exchange Management Shell as the Administrator. Then you need to install the Exchange Online Module at the management shell.
Install-Module MSOnline
It will ask you to validate your given command. Click Yes.
- Import the Exchange Online module.
Import-Module MSOnline
It will ask you to import the credentials of your Exchange account before starting the removal of the domain. Input the credentials.
- Run the command;
Get-MSOLUser | Where-Object { $_.UserPrincipalName –like “*johnlabs.com”}
The command will enlist all the users who are associated with the johnlabs.com domain name.
- Run the command;
Get-MSOLUser | Where-Object { $_.UserPrincipalName –like “*johnlabs.com”} | Remove-Msoluser
The command will first enlist all the users and then delete them one by one. You will need to click Y for every user.
After all the users are deleted from the domain, then you can go to Office 365 Admin Center, find the Domain in the Domains category. Select the domain and click Remove.
Limitations of the Manual Methods
The first method is limited for the removal of a single user from the whole domain and it takes time to remove the multiple users one by one. This process also carries high risk of data loss. Whereas the second method removes the whole accounts together. It is advisable to migrate all your emails and other data from your mailboxes before removing the domain from it.
Migrate Data to New Domain with a Reliable Solution
Manually moving users and groups from old domain to new carries the chances of data loss. Also, users must have Office 365 Admin access to perform both of these methods. Then what’s the best way to migrate data in bulk from old domain to new? Use a trusted Office 365 Migration tool. Kernel Office 365 Migration tool is one of the most trusted tool to supports the migration of the mailbox data for a single as well as multiple mailboxes. It supports all Office 365 subscription plans.
You will be able to migrate all your data from the mailbox, archive mailbox, and public folder. For a smooth migration, you will also get multiple filter options to exclude the unrequired data; and after the migration, you will be able to get a complete migration report. So, if you are planning to remove a domain from Office 365, then you should use this tool to migrate all your Office 365 data and remove the domain name. Your data will be saved in a different account where you can access them. You can also migrate data from one Office 365 tenant to another.
People Also Ask
A. All your email addresses services associated with your domain will get removed. You won’t be able to use any services or send any emails until you’ve moved to the new domain.
A. Move all the users and groups to the new domain and then click on Settings > Domains. Right-click on the domain of your choice and click on Remove Domain.
A. Usually it takes up to 24-48 hours to permanently remove the domain and for all the changes to take effect.
