Delete an enterprise application

In this article, you learn how to delete an enterprise application that was added to your Azure Active Directory (Azure AD) tenant.

When you delete and enterprise application, it will be held in a suspended state in the recycle bin for 30 days. During the 30 days, you can Restore the application. Deleted items are automatically hard deleted after the 30-day period. For more information on frequently asked questions about deletion and recovery of applications, see Deleting and recovering applications FAQs.

Prerequisites

To delete an enterprise application, you need:

Delete an enterprise application

  1. Sign in to the Azure portal and sign in using one of the roles listed in the prerequisites.

  2. In the left menu, select Enterprise applications. The All applications pane opens and displays a list of the applications in your Azure AD tenant. Search for and select the application that you want to delete. For example, Azure AD SAML Toolkit 1.

  3. In the Manage section of the left menu, select Properties.

  4. At the top of the Properties pane, select Delete, and then select Yes to confirm you want to delete the application from your Azure AD tenant.

    Delete an enterprise application.

Important

Make sure you're using the AzureAD module. This is important if you've installed both the AzureAD module and the AzureADPreview module.

  1. Run the following commands:

    Remove-Module AzureADPreview
    Import-Module AzureAD
    
  2. Connect to Azure AD PowerShell:

    Connect-AzureAD
    
  3. Get the list of enterprise applications in your tenant.

    Get-AzureADServicePrincipal
    
  4. Record the object ID of the enterprise app you want to delete.

  5. Delete the enterprise application.

    Remove-AzureADServicePrincipal -ObjectId 'd4142c52-179b-4d31-b5b9-08940873507b'
    
  1. Connect to Microsoft Graph PowerShell:

    Connect-MgGraph -Scopes 'Application.Read.All'
    
  2. Get the list of enterprise applications in your tenant.

    Get-MgServicePrincipal
    
  3. Record the object ID of the enterprise app you want to delete.

  4. Delete the enterprise application.

    Remove-MgServicePrincipal -ServicePrincipalId 'd4142c52-179b-4d31-b5b9-08940873507b'
    

Delete an enterprise application using Graph Explorer.

  1. To get the list of service principals in your tenant, run the following query.

    GET https://graph.microsoft.com/v1.0/servicePrincipals
    
  2. Record the ID of the enterprise app you want to delete.

  3. Delete the enterprise application.

    DELETE https://graph.microsoft.com/v1.0/servicePrincipals/{servicePrincipal-id}
    

Next steps