Skip to content

Latest commit

 

History

History
120 lines (92 loc) · 4.96 KB

File metadata and controls

120 lines (92 loc) · 4.96 KB
title Permanently delete an item (directory object)
description Permanently delete a recently deleted application, group, service principal, or user from deleted items.
author keylimesoda
ms.localizationpriority medium
ms.subservice entra-directory-management
doc_type apiPageType
ms.date 12/23/2024

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.

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
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-deleted-items-delete-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]

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


Response

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

HTTP/1.1 204 No Content