Delete directoryObject

Deletes a directoryObject.

Prerequisites

The following scopes is required to execute this API: Directory.AccessAsUser.All

NOTE: Users, groups, and contacts are types of directory object. As a result,if you need to delete users, the following scope can and should be used: User.ReadWrite.All

HTTP request

DELETE /directoryObjects/{id}

Request headers

Name Type Description
Authorization string Bearer {token}. Required.

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/v1.0/directoryObject/{id}
Response
HTTP/1.1 204 No Content