Delete an Azure Active Directory
When you try to delete an Active Directory you will go crazy because
You will get an error
You will clean all the users but will still get the below error.
You try to clean up all the applications in the list of applications. You select “Applications my Company owns” and the do the filter, you will find no applications.
But when you select “Applications my company uses” you will get
And you will not be able to delete this entry.
Here are the steps.
First one Azure Active Directory PowerShell
If this is not available then please download it from Azure Active Directory Module for Windows PowerShell (64-bit version) http://go.microsoft.com/fwlink/p/?linkid=236297
Go ahead and create an user called “delete”
you need to login once to change the default password. So use https://login.microsoftonline.com/ and change the default password
This user is required login to the power shell.
After we have the PowerShell we can run (optional)
After that run
This will prompt the login and here you will pass the Global Admin user name and password created above. You should not get any error here.
Then run Get-MsolServicePrincipal | Remove-MsolServicePrincipal
You will get a lot of errors just ignore them
You are almost done. You need to go to portal and delete the user
Now should be able to delete it.