Recently I had the task of performing a few tenant-to-tenant migrations of Microsoft 365 as our client was splitting their business units.
Well, this particular issue cost me a Father’s Day weekend and took about 3 days to get Microsoft’s Global Critical Situation team to work it out. Not going to go into the details of unable to get an engineer to work on my case for more than 5 mins before their shift ended and had another engineer assigned, but that’s my PSTD to bear.
My Process for Removing the Domain
For this project (and the one prior to this that had no issue on the same tenant), these are the steps I carried out.
- For Each User
- Convert Mailbox to Shared Mailbox
- Remove Licensing
- Remove all associated aliases and usernames containing the domain to be removed
- For Groups
- Same as above, remove any associated aliases and usernames
- Once all addresses associated addresses had been removed, remove the domain from the tenant and start adding the domain to the new tenant
So back to the SIP Aliases…
Before you can remove the domain from the tenant, you need to remove the usage from users including user names and aliases. For the most part I had done this, however there were these aliases that I just couldn’t remove.
As you will see in the screenshot above, you can see there’s a long string of random characters before the old email address of the account.
In MicrosoftTeams Powershell, you could see these aliases existing, but they were nowhere to be found on the Exchange Admin centre for the user.
Here’s the command to get the aliases I was using:
More on Microsoft Teams PowerShell Install
Get-CSOnlineUser <Username> | Select SipProxyAddress,SipAddress | FL
There’s no MicrosoftTeams PowerShell command to remove or alter these aliases in this view.
This whole situation was very painful and stressful as the hours ticked by and I was running out of time before the Monday morning when the users would return to work and have no email since I couldn’t remove the domain because of these aliases.
Frustratingly, it was pretty straight forward to resolve.
- Re-add back the license to the account with the problem alias
This can be the original license, or just at least something that gets the mailbox back.
- In Exchange Admin Centre, go to the mailbox
- Add a SIP Alias (Primary) to the user’s mailbox
When I added the alias back on to the account, this overrode the problem SIP address and I was then able to remove the alias, meaning that I could now remove the domain from the tenant.
When I ran into this again from another migration, I noticed these odd aliases were created somewhere around the time the mailbox was converted to a Shared Mailbox. Something caused this long and detached aliased that didn’t show anywhere else.
The resolution above was given by Microsoft in about 5mins, after waiting for someone to figure it out and call me for three days.
I’m hoping this post saves someone else from the troubles I had.
Please check out my other posts like this one on accessing a Windows PC via RDP using a Microsoft Account, and leave a comment below.