Decommissioning Old Tenants


I had a domain associated with an unused Microsoft 365 tenant. I had not used this domain in years, but needed it for a demo environment. The old tenant it was associated with had (presumably) been “fixed” by Microsoft as it has not been used in so long. So when I tried to delete Distribution Groups it failed with various errors. I needed to remove the group because it had the domain I wanted to remove from the tenant in their email address. I was also unable to edit the group because of the same reason.

The reason given when trying the Remove-DistributionList in Exchnage Online PowerShell was: Remove-DistributionGroup: ||The following error occurred during validation in agent ‘Substrate Only Agent’: ‘Organization
“tenantname.onmicrosoft.com” is not licensed for Exchange email functionality. Cmdlet usage is restricted.’

Try to remove the group in the admin portal and there was not “Delete” button!

So I licenced the tenant with a trial licence. After adding a licence to the tenant I found I could not login to the Exchange Admin Portal. This was fixed by finding the “Office 365 Exchange Online” application in Entra Portal > Enterprise Applications (deselecting the default filter of “Enterprise Apps” so that all the Microsoft 1st party apps appear as well. This “Office 365 Exchange Online” app was disabled. I changed under Properties “Enabled for users to sign-in” and the Activation Status went from Disabled to Activated.

Nothing changed, apart from I could login to the portal and Exchange Online PowerShell. I still had no Delete button in the portal and was getting the above error in PowerShell.

After about 15 minutes from getting the trial licence on the tenant I got the Delete button in the Exchange Admin Portal when selecting the distribution group. But delete failed with “‎Group_Name could not be deleted An exception of type Microsoft.Online.BOX.Util.Exceptions.InternalException (EXOBadRequest) was thrown.”

So I waited an hour and went for a coffee…

…That was nice. I recommend https://www.manumitcoffee.co.uk/ for a coffee subscription if you live in the UK!

And so one hour after I added a subscription to the tenant again I was able to delete the distribution groups that held my domain, and release the domain from an old unused tenant and add it to a new one.

Photo by vedanti: https://www.pexels.com/photo/quilted-leather-cover-242616/


Posted

in

, , , , ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.