Skip to content

Latest commit

 

History

History
111 lines (73 loc) · 5.08 KB

File metadata and controls

111 lines (73 loc) · 5.08 KB
title Delete an enterprise application
description Delete an enterprise application in Microsoft Entra ID.
ms.topic how-to
ms.date 03/06/2025
ms.reviewer sureshja
zone_pivot_groups enterprise-apps-all
ms.custom enterprise-apps, no-azure-ad-ps-ref, sfi-image-nochange

Delete an enterprise application

In this article, you learn how to delete an enterprise application that was added to your Microsoft Entra tenant.

When you delete and enterprise application, it remains 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.

Important

Before deleting an enterprise application, consider whether deactivating it meets your needs. Deactivation prevents token issuance and user sign-in while preserving the application configuration, making it ideal for investigation, security incidents, or temporary suspension.

Prerequisites

To delete an enterprise application, you need:

:::zone pivot="portal"

Delete an enterprise application using Microsoft Entra admin center

  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.

  2. Browse to Entra ID > Enterprise apps | All applications

  3. Enter the name of the existing application in the search box, and then select the application from the search results. In this article, we use the Microsoft Graph Command Line Tools as an example.

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

  5. At the top of the Properties pane, select Delete, and then select Yes to confirm you want to delete the application from your Microsoft Entra tenant.

    :::image type="content" source="media/delete-application-portal/delete-application.png" alt-text="screenshot of how to delete an enterprise application." lightbox="media/delete-application-portal/delete-application.png":::

:::zone-end

:::zone pivot="entra-powershell"

Delete an enterprise application using Microsoft Entra PowerShell

Make sure you're using the Microsoft Entra PowerShell module.

  1. Connect to Microsoft Entra PowerShell and sign in as at least a Cloud Application Administrator.

  2. Get the application you want to delete by filtering by the application name, then delete the application.

    Connect-Entra -Scopes 'Application.ReadWrite.All'
    Get-EntraServicePrincipal -Filter "displayName eq 'Test-app1'" | Remove-EntraServicePrincipal

:::zone-end

:::zone pivot="ms-powershell"

Delete an enterprise application using Microsoft Graph PowerShell

  1. Connect to Microsoft Graph PowerShell and sign in as at least a Cloud Application Administrator:

    Connect-MgGraph -Scopes 'Application.ReadWrite.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 'aaaaaaaa-bbbb-cccc-1111-222222222222'

:::zone-end

:::zone pivot="ms-graph"

Delete an enterprise application using Microsoft Graph API

To delete an enterprise application using Graph Explorer, you need to sign in as at least a Cloud Application Administrator.

  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}

:::zone-end

Related content