Update administrativeunit

Update the properties of an administrativeUnit object.

Prerequisites

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

HTTP request

PATCH /administrativeUnits/{id}

Optional request headers

Request headers

Name Description
Authorization Bearer . Required.

Request body

In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.

Property Type Description
description string Description for the administrative unit.
displayName string Display name for the administrative unit.
visibility string Visibility for the administrative unit. If not set then the default is "public". Can be set to "HiddenMembership", which hides the membership from non-members.

Response

If successful, this method returns a 200 OK response code and updated administrativeUnit object in the response body.

Example

Request

Here is an example of the request.

PATCH https://graph.microsoft.com/beta/administrativeUnits/{id}
Content-type: application/json
Content-length: 114

{
  "displayName": "displayName-value",
  "description": "description-value",
  "visibility": "visibility-value"
}
Response

Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 204 No content