Skip to content

Latest commit

 

History

History
124 lines (98 loc) · 5.9 KB

File metadata and controls

124 lines (98 loc) · 5.9 KB
title Permanently delete an item (directory object)
description Permanently delete a recently deleted application, group, service principal, or user from deleted items.
author vimranga
ms.localizationpriority medium
ms.subservice entra-directory-management
doc_type apiPageType
ms.date 06/23/2025

Permanently delete an item (directory object)

Namespace: microsoft.graph

Permanently delete a recently deleted application, group, servicePrincipal, or user object from deleted items. After an item is permanently deleted, it cannot be restored.

Permanently delete a recently deleted directory object from deleted items. The following types are supported:

After an item is permanently deleted, it cannot be restored.

Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored.

[!INCLUDE national-cloud-support]

Permissions

The following table shows the least privileged permission or permissions required to call this API on each supported resource type. Follow best practices to request least privileged permissions. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Supported resource Delegated (work or school account) Delegated (personal Microsoft account) Application
application Application.ReadWrite.All Not supported. Application.ReadWrite.OwnedBy
agentIdentity AgentIdentity.ReadWrite.All Not supported. AgentIdentity.ReadWrite.All
agentIdentityBlueprint AgentIdentityBlueprint.ReadWrite.All Not supported. AgentIdentityBlueprint.ReadWrite.All
agentIdentityBlueprintPrincipal AgentIdentityBlueprintPrincipal.ReadWrite.All Not supported. AgentIdentityBlueprintPrincipal.ReadWrite.All
certificateBasedAuthPki PublicKeyInfrastructure.Read.All Not supported. PublicKeyInfrastructure.Read.All
certificateAuthorityDetail PublicKeyInfrastructure.Read.All Not supported. PublicKeyInfrastructure.Read.All
group Group.ReadWrite.All Not supported. Not supported.
servicePrincipal Application.ReadWrite.All Not supported. Application.ReadWrite.OwnedBy
user User.DeleteRestore.All Not supported. User.DeleteRestore.All

[!INCLUDE rbac-directory-deleted-items-apis]

HTTP request

DELETE /directory/deletedItems/{id}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Accept application/json

Request body

Don't supply a request body for this method.

Response

If successful, this method returns 204 No Content response code. It doesn't return anything in the response body.

Example

Request

DELETE https://graph.microsoft.com/v1.0/directory/deletedItems/{object-id}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

Note: The response object shown here might be shortened for readability.

HTTP/1.1 204 No Content