Remove a member

Namespace: microsoft.graph

Use this API to remove a member (user, group, or device) from an administrative unit.

Permissions

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

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

To remove a member from an administrative unit, the calling principal must be assigned one of the following Azure AD roles:

  • Privileged Role Administrator
  • Global Administrator

HTTP request

DELETE /directory/administrativeUnits/{id}/members/{id}/$ref

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

The following is an example of the request. In the example below, {id1} represents the identifier for the target administrative unit, and {id2} represents the unique identifier for the member user, group, or device to be removed from the target administrative unit.

DELETE https://graph.microsoft.com/v1.0/directory/administrativeUnits/{id1}/members/{id2}/$ref

Response

Here is an example of the response.

HTTP/1.1 204 No Content