This post summarizes and lists down the information you need to solve the specific error which occurs when you try to delete a AAD.
There are plenty of articles for this and I recommend to read the link below which explains very frequent error messages of AAD and the fixes.
Also read this blog for a detailed description.
Some useful information
In order to manage the AAD using PowerShell we need to install two components.
- AAD Module for PowerShell
- Microsoft Online Services Sign-in Assistant
See the below article on how you can accomplish this.
- Login to Azure Portal using your service administrator account.
- Make sure there are no users or other external applications. (If you find any of them delete them)
- Create a Global Admin user in the AAD you want to delete.
- In the PowerShell, login as the created Global Admin user
- Run the following script
- You will get error messages as mentioned in Alexe’s Blog but you can simply ignore them.
- Then go to the portal and delete the created Global Admin user.
- And finally delete the AAD.