How to Delete an Azure Active Directory when Facing the Enterprise Application Deletion Error

Recently, I got a strange issue when trying to delete an Azure Active Directory I created: it kept asking me to “Delete all Enterprise Applications” even the Enterprise application list is empty after I clicks the suggested link.

After filing a support ticket and trying many different suggested things, finally a solution worked for me (Kudos to the Azure support):

1. Connect-MsolService (if you have an unrecognized command error, run the following in an admin PowerShell window first: Install-Module MSOnline)
2. Input a global admin’s credentials for your azure tenant.
3. Run the following command: Get-MsolServicePrincipal
4. If you have any output, run the following command: Get-MsolServicePrincipal | Remove-MsolServicePrincipal (Note you will see some red output, and you can ignore it.)

After these steps, the required action for Enterprise Application deletion was gone. I was able to delete the Active Directory.

Leave a Reply

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