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 update an administrative unit, the calling principal must be assigned one of the following Azure AD roles:
Privileged Role Administrator
Global Administrator
HTTP request
PATCH /directory/administrativeUnits/{id}
Request headers
Name
Description
Authorization
Bearer {token}. Required.
Content-type
application/json. 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.
Since the administrativeUnit resource supports extensions, you can use the PATCH operation to add, update, or delete your own app-specific data in custom properties of an extension in an existing administrativeUnit instance.
Response
If successful, this method returns a 204 No Content response code.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewAdministrativeUnit()
displayName := "Greater Seattle District Technical Schools"
requestBody.SetDisplayName(&displayName)
administrativeUnitId := "administrativeUnit-id"
graphClient.Directory().AdministrativeUnitsById(&administrativeUnitId).Patch(requestBody)