|
1 | 1 | ---
|
2 |
| -title: 'Quickstart: Delete an enterprise application' |
| 2 | +title: 'Delete an enterprise application' |
3 | 3 | description: Delete an enterprise application in Azure Active Directory.
|
4 | 4 | services: active-directory
|
5 | 5 | author: omondiatieno
|
6 | 6 | manager: CelesteDG
|
7 | 7 | ms.service: active-directory
|
8 | 8 | ms.subservice: app-mgmt
|
9 |
| -ms.topic: quickstart |
| 9 | +ms.topic: how-to |
10 | 10 | ms.workload: identity
|
11 |
| -ms.date: 03/24/2022 |
| 11 | +ms.date: 07/28/2022 |
12 | 12 | ms.author: jomondi
|
13 | 13 | ms.reviewer: sureshja
|
14 |
| -ms.custom: mode-other |
| 14 | +zone_pivot_groups: enterprise-apps-all |
| 15 | + |
15 | 16 | #Customer intent: As an administrator of an Azure AD tenant, I want to delete an enterprise application.
|
16 | 17 | ---
|
17 | 18 |
|
18 |
| -# Quickstart: Delete an enterprise application |
| 19 | +# Delete an enterprise application |
| 20 | + |
| 21 | +In this article, you learn how to delete an enterprise application that was added to your Azure Active Directory (Azure AD) tenant. |
19 | 22 |
|
20 |
| -In this quickstart, you use the Azure Active Directory Admin Center to delete an application that was added to your Azure Active Directory (Azure AD) tenant. |
| 23 | +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](restore-application.md). 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](delete-recover-faq.yml). |
21 | 24 |
|
22 |
| -It is recommended that you use a non-production environment to test the steps in this quickstart. |
23 | 25 |
|
24 | 26 | ## Prerequisites
|
25 | 27 |
|
26 | 28 | To delete an enterprise application, you need:
|
27 | 29 |
|
28 | 30 | - An Azure AD user account. If you don't already have one, you can [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
|
29 | 31 | - One of the following roles: Global Administrator, Cloud Application Administrator, Application Administrator, or owner of the service principal.
|
30 |
| -- Completion of the steps in [Quickstart: Add an enterprise application](add-application-portal.md). |
| 32 | +- An [enterprise application added to your tenant](add-application-portal.md) |
31 | 33 |
|
32 | 34 | ## Delete an enterprise application
|
33 | 35 |
|
34 |
| -To delete an enterprise application: |
| 36 | +:::zone pivot="portal" |
35 | 37 |
|
36 |
| -1. Go to the [Azure Active Directory Admin Center](https://aad.portal.azure.com) and sign in using one of the roles listed in the prerequisites. |
| 38 | +1. Sign in to the [Azure AD portal](https://portal.azure.com) and sign in using one of the roles listed in the prerequisites. |
37 | 39 | 1. 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**.
|
38 | 40 | 1. In the **Manage** section of the left menu, select **Properties**.
|
39 | 41 | 1. 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.
|
40 | 42 |
|
41 | 43 | :::image type="content" source="media/delete-application-portal/delete-application.png" alt-text="Delete an enterprise application.":::
|
42 | 44 |
|
43 |
| -## Clean up resources |
| 45 | +:::zone-end |
| 46 | + |
| 47 | +:::zone pivot="aad-powershell" |
| 48 | + |
| 49 | +> [!IMPORTANT] |
| 50 | +> Make sure you're using the AzureAD module. This is important if you've installed both the [AzureAD](/powershell/module/azuread/?preserve-view=true&view=azureadps-2.0) module and the AzureADPreview module. |
| 51 | +1. Run the following commands: |
| 52 | + |
| 53 | + ```powershell |
| 54 | + Remove-Module AzureADPreview |
| 55 | + Import-Module AzureAD |
| 56 | + ``` |
| 57 | +
|
| 58 | +1. Connect to Azure AD PowerShell: |
| 59 | +
|
| 60 | + ```powershell |
| 61 | + Connect-AzureAD |
| 62 | + ``` |
| 63 | +1. Get the list of enterprise applications in your tenant. |
| 64 | + |
| 65 | + ```powershell |
| 66 | + Get-AzureADServicePrincipal |
| 67 | + ``` |
| 68 | +1. Record the object ID of the enterprise app you want to delete. |
| 69 | +1. Delete the enterprise application. |
| 70 | + |
| 71 | + ```powershell |
| 72 | + Remove-AzureADServicePrincipal $ObjectId 'd4142c52-179b-4d31-b5b9-08940873507b' |
| 73 | + ``` |
| 74 | +:::zone-end |
| 75 | + |
| 76 | +:::zone pivot="ms-powershell" |
| 77 | + |
| 78 | +1. Connect to Microsoft Graph PowerShell: |
| 79 | + |
| 80 | + ```powershell |
| 81 | + Connect-MgGraph -Scopes 'Application.Read.All' |
| 82 | + ``` |
| 83 | + |
| 84 | +1. Get the list of enterprise applications in your tenant. |
| 85 | + |
| 86 | + ```powershell |
| 87 | + Get-MgServicePrincipal |
| 88 | + ``` |
| 89 | +1. Record the object ID of the enterprise app you want to delete. |
| 90 | +1. Delete the enterprise application. |
| 91 | + |
| 92 | + ```powershell |
| 93 | + Remove-MgServicePrincipal -ServicePrincipalId 'd4142c52-179b-4d31-b5b9-08940873507b' |
| 94 | +
|
| 95 | +:::zone-end |
| 96 | +
|
| 97 | +
|
| 98 | +:::zone pivot="ms-graph" |
| 99 | +
|
| 100 | +Delete an enterprise application using [Graph Explorer](https://developer.microsoft.com/graph/graph-explorer). |
| 101 | +1. To get the list of applications in your tenant, run the following query. |
| 102 | + |
| 103 | + ```http |
| 104 | + GET /servicePrincipals |
| 105 | + ``` |
| 106 | +1. Record the ID of the enterprise app you want to delete. |
| 107 | +1. Delete the enterprise application. |
| 108 | + |
| 109 | + ```http |
| 110 | + DELETE /servicePrincipals/{id} |
| 111 | + ``` |
44 | 112 |
|
45 |
| -When you are done with this quickstart series, consider deleting the application to clean up your test tenant. Deleting the application was covered in this quickstart. |
| 113 | +:::zone-end |
46 | 114 |
|
47 | 115 | ## Next steps
|
48 | 116 |
|
49 |
| -Learn more about planning a single sign-on deployment. |
50 |
| -> [!div class="nextstepaction"] |
51 |
| -> [Plan single sign-on deployment](plan-sso-deployment.md) |
| 117 | +- [Restore a deleted enterprise application](restore-application.md) |
0 commit comments