Skip to main content

Posts

Showing posts from November, 2021

Removing Domain - Office 365 / Azure AD Tenant

Recently I had an interesting experience and challenge, removing a domain from an Azure AD (Office 365) Tenant which had been around for years, switching all the users to another domain for logins/UPN. A normal procedure for this should be simple: Change UPN for all users and groups Change any associated apps, email, and other resources Remove Domain (This can be done from Azure Portal, or from Office 365 Admin). The issue for me was that there was resources associated with some users, which I could not find what recourses or how to clear it up. In Azure Portal, Azure AD, Custom Domains - it would not let me delete at all, just showed me a link to the list of users in violation. In office 365 Admin, Settings, Domains - I was able to initiate a Delete action, once, with a supposed automatic removal action. After several hours this failed, and it now remained in a failed state that did not let me try again from UI. So I started digging with PowerShell - I found it most usable with the MS