Hi @Magnus Mårtensson ,
Thanks for your post! There are a few issues that can prevent an enterprise application from being deleted. First, if you haven't done so already, I would recommend trying to remove the application through Powershell using these commands:
1) Connect-Azure AD : Connect-AzureAD
2) Enter Get-AzureADServicePrincipal
to display all registered Enterprise Applications along with their ObjectId
3) Remove-AzureADServicePrincipal -objectid <ObjectId from the list>
to remove the listed application
If you are unable to remove the object via Powershell, please share the output you receive.
There are several other issues that can prevent the deletion of an enterprise application.
1) This will happen when you try to delete servicePrincipals that correspond to a managed identity. Managed identity service principals cannot be deleted the normal way though the Enterprise apps blade or via PowerShell. If this is a managed identity, you need to go to the associated Azure resource to manage it. When the resource is deleted, Azure will automatically delete the identity.
2) If the application is a first party service principal, it can only be deleted through a support case. This is a known issue, for instance, with the tenant schema extension app. If this is the case, you can reach out to Billing support for free here or via the global support numbers.
Additional references:
Delete an enterprise application
Remove service principal
Cannot delete tenant schema extension app
Remove enterprise applications
Let me know if this helps and if you have further questions.
-
If the information helped you, please Accept the answer. This will help us and other community members as well.