Skip to content

Commit 6c1a7e3

Browse files
authored
Merge pull request #206349 from omondiatieno/recover-and-delete
recovery and deletion docs
2 parents 5fbf29b + c83ca38 commit 6c1a7e3

File tree

8 files changed

+356
-134
lines changed

8 files changed

+356
-134
lines changed

.openpublishing.redirection.active-directory.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10825,7 +10825,13 @@
1082510825
"source_path": "articles/active-directory/manage-apps/howto-enforce-signed-saml-authentication.md",
1082610826
"redirect_url": "/azure/active-directory/manage-apps/howto-saml-token-encryption",
1082710827
"redirect_document_id": true
10828+
},
10829+
{
10830+
"source_path_from_root": "/articles/active-directory/manage-apps/recover-deleted-apps-faq.md",
10831+
"redirect_url": "/azure/active-directory/manage-apps/delete-recover-faq",
10832+
"redirect_document_id": false
1082810833
}
1082910834

10835+
1083010836
]
1083110837
}

articles/active-directory/develop/howto-remove-app.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: active-directory
99
ms.subservice: develop
1010
ms.topic: how-to
1111
ms.workload: identity
12-
ms.date: 11/15/2020
12+
ms.date: 07/28/2022
1313
ms.author: ryanwi
1414
ms.custom: aaddev
1515
ms.reviewer: marsma, aragra, lenalepa, sureshja
@@ -48,9 +48,9 @@ To delete an application, be listed as an owner of the application or have admin
4848

4949
## Remove an application authored by another organization
5050

51-
If you are viewing **App registrations** in the context of a tenant, a subset of the applications that appear under the **All apps** tab are from another tenant and were registered into your tenant during the consent process. More specifically, they are represented by only a service principal object in your tenant, with no corresponding application object. For more information on the differences between application and service principal objects, see [Application and service principal objects in Azure AD](./app-objects-and-service-principals.md).
51+
If you're viewing **App registrations** in the context of a tenant, a subset of the applications that appear under the **All apps** tab are from another tenant and were registered into your tenant during the consent process. More specifically, they're represented by only a service principal object in your tenant, with no corresponding application object. For more information on the differences between application and service principal objects, see [Application and service principal objects in Azure AD](./app-objects-and-service-principals.md).
5252

53-
In order to remove an application’s access to your directory (after having granted consent), the company administrator must remove its service principal. The administrator must have Global Administrator access, and can remove the application through the Azure portal or use the [Azure AD PowerShell Cmdlets](/previous-versions/azure/jj151815(v=azure.100)) to remove access.
53+
In order to remove an application’s access to your directory (after having granted consent), the company administrator must remove its service principal. The administrator must have Global Administrator access. To learn how to delete a service principal, see [Delete an enterprise application](../manage-apps/delete-application-portal.md).
5454

5555
## Next steps
5656

articles/active-directory/develop/howto-restore-app.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,19 @@ ms.service: active-directory
99
ms.subservice: develop
1010
ms.topic: how-to
1111
ms.workload: identity
12-
ms.date: 3/22/2021
12+
ms.date: 07/28/2022
1313
ms.author: arcrowe
1414
ms.custom: aaddev
1515
#Customer intent: As an application developer, I want to know how to restore or permanently delete my recently deleted application from the Microsoft identity platform.
1616
---
1717

1818
# Restore or remove a recently deleted application with the Microsoft identity platform
19-
After you delete an app registration, the app remains in a suspended state for 30 days. During that 30-day window, the app registration can be restored, along with all its properties. After that 30-day window passes, app registrations cannot be restored and the permanent deletion process may be automatically started. This functionality only applies to applications associated to a directory. It is not available for applications from a personal Microsoft account, which cannot be restored.
2019

21-
You can view your deleted applications, restore a deleted application, or permanently delete an application using the App registrations experience under Azure Active Directory (Azure AD) in the Azure portal.
20+
After you delete an app registration, the app remains in a suspended state for 30 days. During that 30-day window, the app registration can be restored, along with all its properties. After that 30-day window passes, app registrations can't be restored, and the permanent deletion process may be automatically started. This functionality only applies to applications associated to a directory. It isn't available for applications from a personal Microsoft account, which can't be restored.
2221

23-
Note that neither you nor Microsoft customer support can restore a permanently deleted application or an application deleted more than 30 days ago.
22+
You can view your deleted applications, restore a deleted application, or permanently delete an application using the **App registrations** experience under Azure Active Directory (Azure AD) in the Azure portal.
2423

25-
> [!IMPORTANT]
26-
> The deleted applications portal UI feature [!INCLUDE [PREVIEW BOILERPLATE](../../../includes/active-directory-develop-preview.md)]
24+
Neither you nor Microsoft customer support can restore a permanently deleted application or an application deleted more than 30 days ago.
2725

2826
## Required permissions
2927
You must have one of the following roles to permanently delete applications.
@@ -50,9 +48,9 @@ Review the list of applications. Only applications that have been deleted in the
5048

5149
## Restore a recently deleted application
5250

53-
When an app registration is deleted from the organization, the app is in a suspended state and its configurations are preserved. When you restore an app registration, its configurations are also restored. However, if there were any organization-specific settings in **Enterprise applications** for the application's home tenant, those will not be restored.
51+
When an app registration is deleted from the organization, the app is in a suspended state, and its configurations are preserved. When you restore an app registration, its configurations are also restored. However, if there were any organization-specific settings in **Enterprise applications** for the application's home tenant, those won't be restored.
5452

55-
This is because organization-specific settings are stored on a separate object, called the service principal. Settings held on the service principal include permission consents and user and group assignments for a certain organization; these configurations will not be restored when the app is restored. For more information, see [Application and service principal objects](app-objects-and-service-principals.md).
53+
This is because organization-specific settings are stored on a separate object, called the service principal. Settings held on the service principal include permission consents and user and group assignments for a certain organization; these configurations won't be restored when the app is restored. To learn how to restore the service principal with its previous configurations, see [Restore a recently deleted enterprise application](../manage-apps/restore-application.md).
5654

5755

5856
### To restore an application
Lines changed: 81 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,117 @@
11
---
2-
title: 'Quickstart: Delete an enterprise application'
2+
title: 'Delete an enterprise application'
33
description: Delete an enterprise application in Azure Active Directory.
44
services: active-directory
55
author: omondiatieno
66
manager: CelesteDG
77
ms.service: active-directory
88
ms.subservice: app-mgmt
9-
ms.topic: quickstart
9+
ms.topic: how-to
1010
ms.workload: identity
11-
ms.date: 03/24/2022
11+
ms.date: 07/28/2022
1212
ms.author: jomondi
1313
ms.reviewer: sureshja
14-
ms.custom: mode-other
14+
zone_pivot_groups: enterprise-apps-all
15+
1516
#Customer intent: As an administrator of an Azure AD tenant, I want to delete an enterprise application.
1617
---
1718

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.
1922

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).
2124

22-
It is recommended that you use a non-production environment to test the steps in this quickstart.
2325

2426
## Prerequisites
2527

2628
To delete an enterprise application, you need:
2729

2830
- 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).
2931
- 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)
3133

3234
## Delete an enterprise application
3335

34-
To delete an enterprise application:
36+
:::zone pivot="portal"
3537

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.
3739
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**.
3840
1. In the **Manage** section of the left menu, select **Properties**.
3941
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.
4042

4143
:::image type="content" source="media/delete-application-portal/delete-application.png" alt-text="Delete an enterprise application.":::
4244

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+
```
44112

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
46114

47115
## Next steps
48116

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)
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
### YamlMime:FAQ
2+
metadata:
3+
title: Deletion and recovery of applications FAQ
4+
description: Find answers to frequently asked questions (FAQs) about recovering deleted apps and service principals.
5+
6+
services: active-directory
7+
ms.service: active-directory
8+
ms.subservice: app-mgmt
9+
ms.topic: faq
10+
ms.workload: identity
11+
ms.date: 07/28/2021
12+
ms.author: jomondi
13+
author: omondiatieno
14+
manager: celesteDG
15+
ms.reviewer: sureshja
16+
ms.collection: M365-identity-device-management
17+
18+
title: Deletion and recovery of applications FAQ
19+
summary: |
20+
The following are some frequently asked questions (FAQs) on deletion and recovery of applications.
21+
22+
sections:
23+
- name: Single section - ignored
24+
questions:
25+
- question: |
26+
When I create applications, I'm getting Directory_QuotaExceeded error. How can I avoid this problem?
27+
answer: |
28+
> A non-admin user can create no more than 250 Azure AD resources that include applications and service principals. Both active resources and deleted resources that are available to restore count toward this quota. Even if you delete more applications that you don't need, they'll still add count to the quota. To free up the quota, you need to [permanently delete](restore-application.md#permanently-delete-an-enterprise-application) objects in the deleted items container.
29+
>
30+
> For more information about the service limits, see [Azure resource management](/azure/azure-resource-manager/management/azure-subscription-service-limits?msclkid=6cb6cc54c68711ec93eb9539fce3cc28#active-directory-limits).
31+
>
32+
>
33+
- question: |
34+
Where can I find all the deleted applications and service principals?
35+
answer: |
36+
> Soft-deleted application and service principal objects go into the deleted items container and remain available to restore for up to 30 days. After 30 days, they're permanently deleted, and this frees up the quota.
37+
>
38+
> To learn how to view deleted application objects through the Azure portal, see [View restorable applications](/develop/howto-restore-app.md#to-view-your-restorable-applications).
39+
>
40+
> Deleted service principals can't be viewed through the Azure portal. To learn how to view your restorable service principals using PowerShell or Microsoft Graph API, see [View restorable service principals](restore-application.md#view-restorable-enterprise-applications).
41+
>
42+
>
43+
- question: |
44+
How do I restore deleted applications or service principals?
45+
answer: |
46+
> To learn how to restore recently deleted application registrations through the Azure portal, see [Restore application registrations](../develop/howto-restore-app.md).
47+
>
48+
> To learn how to restore recently deleted service principals, see [Restore service principals](restore-application.md). This method is also applicable for restoring recently deleted application registrations using PowerShell or Microsoft Graph API.
49+
- question: |
50+
How do I permanently delete soft deleted applications or service principals?
51+
answer: |
52+
> To permanently delete application registrations through the Azure portal, see [Permanently delete an application](../develop/howto-restore-app.md#permanently-delete-an-application).
53+
>
54+
> To permanently delete a service principal, see [Permanently delete a service principal](restore-application.md#permanently-delete-an-enterprise-application). This method is also applicable for permanently deleting application registrations using PowerShell or Microsoft Graph API.
55+
- question: |
56+
Can I configure the interval in which applications and service principals are permanently deleted by Azure AD?
57+
answer: |
58+
> No. You can't configure the periodicity of hard deletion.
59+
>
60+
- question: |
61+
I lost my SAML SSO configurations after deleting and restoring my application through app registrations in the Azure portal. How can I restore my configurations?
62+
answer: |
63+
> The SAML SSO configurations are stored on the service principal object. When you restore an application from the **App registrations** UI, it recovers the app object but creates a new service principal. The SAML SSO configurations done earlier to the app are lost when restoring a deleted application using the **App registrations** UI.
64+
>
65+
> To correct this problem, delete the new service principal the **App registrations** experience created and [Restore the original service principal](restore-application.md).
66+
>
67+
> If you didn't record the service principal before deleting the application, use the [list deleted items](/graph/api/directory-deleteditems-list?tabs=http) API to fetch the deleted service principal and filter the results by the client's application ID (**appId**) property using the following syntax:
68+
>
69+
> `https://graph.microsoft.com/v1.0/directory/deletedItems/microsoft.graph.servicePrincipal?$filter=appId eq '{appId}'`.
70+
> Once you've retrieved the object ID of the deleted service principal, proceed to [restore](restore-application.md) it.
71+
- question: |
72+
Why can't I recover managed identities?
73+
answer: |
74+
> [Managed identities](../managed-identities-azure-resources/overview.md) are a special type of service principals. Deleted managed identities can't be recovered currently.
75+
>
76+
>
77+
- question: |
78+
I can't see the provisioning data from a recovered service principal. How can I recover it?
79+
answer: |
80+
> After recovering a service principal, you may initially see the error in the following screenshot. This issue will resolve itself between 40 mins and 1 day. If you'd like the provisioning job to start immediately, you can hit restart to force the provisioning service to run again. Hitting restart will trigger an initial cycle that can take time for customers with 100K+ users or group memberships.
81+
>
82+
> :::image type="content" source="media/delete-application-portal/recover-user-provisioning.png" alt-text="Screenshot of recovering user provisioning data.":::
83+
>
84+
- question: |
85+
I recovered my application that was configured for application proxy. I can't see app proxy configurations after the recovery. How can I recover it back?
86+
answer: |
87+
> App proxy configurations can't be recovered through the portal UI. Use the API to recover app proxy settings. Expect a delay of up to 24 hours as the app proxy data gets synced back.
88+
- question: |
89+
I can't see the policies I set on the service principal object after the recovery. How can I recover them?
90+
answer: |
91+
> Policies can't be recovered currently. When you restore a service principal, you'll have to configure the policies again.
92+
>
93+
>
94+
95+
additionalContent: |
96+
## Next steps
97+
* [Restore a service principal](restore-application.md)
98+
* [Restore an application registration](../develop/howto-restore-app.md)

0 commit comments

Comments
 (0)