Removing a domain from an Office365 Tenant

Had a good four-hour fight trying to remove a domain from an Office365 Tenant belonging to a client. The tenant has 9 domains that are entwined with various email addresses for various employees. The client sold 3 businesses and is working with the purchaser to migrate the domains and email to their own instance. Total, 81 users were being migrated off.

All of Microsoft’s instructions show that it’s a 2-minute job to sign in to the admin portal, go to settings, domains and simply remove the domain. But we all know life with Microsoft isn’t that easy.

Using the Settings, Domains, (domain-to-be-released), Users field, I could see the users that needed to have their domains changed to the <tenant>.onmicrosoft.com domain. Click a bunch of check boxes, remove domain, and some of the users would disappear, but I was stuck with 25 users that I could not release.

Went through each user account and found peculiarities that I cleaned up. Email address’ that could not be converted from the domain-to-be-released because a similar email address existed on another domain in the same tenant. Think sales@contoso to sales@<…>. Manually corrected those but still could not release the domain.

Working with some Powershell scripts, I was able to find 25 users that still had the domain in their accounts but it was under the read-only property IMAddresses (or IM Addresses).

Using the Powershell command:

Get-MsolUser –DomainName <domain-to-be-released>

I was given a list of the 25 users. Looking closer at the list, I noticed that those 25 users were all Exchange Online (Plan 1). Looking around, Reddit popped up this gem:

Ultimately the fix from that Reddit post was to convert the account from Exchange Online (Plan 1) to a full Business license and then convert the account back to Exchange Online (Plan 1).

Manually worked through those 25 accounts and was able to release the domains. Hopefully this helps someone else.

Scroll to top