Permanently delete item (directory object)

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

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

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

For applications and service principals:

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Application.ReadWrite.All, Directory.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Application.ReadWrite.OwnedBy, Application.ReadWrite.All

The calling user must be the owner of the application or the calling app must be assigned one of the following Azure AD roles:

  • Global Administrator
  • Application Administrator
  • Cloud Application Administrator
  • Hybrid Identity Administrator

For users:

Permission type Permissions (from least to most privileged)
Delegated (work or school account) User.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Not supported.

The signed-in user needs to have one of the following roles: Global Administrator or User Administrator.

For groups:

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Group.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Not supported.

The requestor needs to have one of the following roles: Global Administrator or Groups Administrator.

HTTP request

DELETE /directory/deleteditems/{id}

Request headers

Name Description
Authorization Bearer <code> Required
Accept application/json

Request body

Do not supply a request body for this method.

Response

If successful, this method returns 204 No Content response code. It does not return anything in the response body.

Example

Request

DELETE https://graph.microsoft.com/beta/directory/deleteditems/46cc6179-19d0-473e-97ad-6ff84347bbbb

Response

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

HTTP/1.1 204 No Content