Delete directoryObject
Namespace: microsoft.graph
Delete a directory object, for example, a group, user, application, or service principal.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Delete a user
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | User.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. |
Application | User.ReadWrite.All |
Delete a group
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | Group.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. |
Application | Group.ReadWrite.All |
Delete an application or service principal
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | Application.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. |
Application | Application.ReadWrite.All |
HTTP request
DELETE /directoryObjects/{id}
Request headers
Name | Description |
---|---|
Authorization | 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/directoryObjects/ffab4dce-9b82-49a6-b7c7-1a143106598c
Response
HTTP/1.1 204 No Content
Feedback
Submit and view feedback for