Removing an Old Stale Azure and Office 365 Domain for Use in a New Azure Active Directory Connection
Recently, I started a new job where I needed to learn Microsoft’s Azure and Azure Virtual Desktop (AVD). My friend Claudio Rodrigues recently released his excellent book DAAS The Complete Guide, and I am using his book to guide my learning.
In Chapter 2, Azure Virtual Desktop, Claudio walks through configuring Synchronizing AD with Azure Active Directory. Step 4 in that process is verifying your custom domain. My verification failed with the message shown in Figure 1.
To make an hours-long story short, it took me a while to figure out when I had set up LabADDomain.com for use in Azure or Office 365 (along with the username and password). I eventually found that I created a free Azure account and an Office 365 account several years ago. Removing the domain LabADDomain.com for those accounts took a few hours because even Microsoft support didn’t know how to remove an old domain.
This article outlines the steps that took Microsoft and me over four hours to resolve. I hope you can follow these steps saving you hours of frustration for those with labs and possibly multiple domain names.
Several years ago, I created an Office 365 trial for LabADDomain.com with an admin account named firstname.lastname@example.org. I used that account to create a free Azure trial using Azure AD Connect connecting to my on-premises AD LabADDomain.com domain. That version of the LabADDomain.com AD is long gone. Webster’s Lab gets rebuilt almost annually. The original domain and domain controllers no longer exist, so nothing to uninstall and remove the sync to Azure AD. To resolve the issue, it took many emails, phone calls, and remote support sessions with Microsoft Support.
When you create an Office 365 subscription, there are two domains created: YourDomain.com and YourDomain.OnMicrosoft.com.
Here are the steps we took to remove the stale domain.
1. Create a global admin for labaddomain.onmicrosoft.com named ctxadmin.
2. Log off from the old email@example.com admin account.
3. Login with the new firstname.lastname@example.org admin account.
4. Go to the O365 admin center, Figure 2.
5. Show all, Figure 3.
6. Setup, Figure 4.
7. Domains, Figure 5.
8. Select the old domain to remove.
9. Click the vertical three dots next to Filter.
10. Click either Delete Domain or Remove Domain (I can’t remember the verbiage).
11. Wait about an hour.
12. Click Refresh every few minutes. For me, it took about an hour before the console no longer showed the old domain. You must wait until the domain deletes before continuing.
13. You can now use the old domain as a new domain for AAD, Figure 6.
I hope this brief article helps someone else from spending hours with Microsoft support to remove a long-forgotten domain from a long-forgotten Azure or Office 365 trial.