Update directorySetting

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Update the properties of a specific directory setting object.

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) Directory.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Directory.ReadWrite.All

The following permissions are required to update the "Consent Policy Settings" directorySetting object.

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

HTTP request

Update a tenant-wide setting.

PATCH /settings/{directorySettingId}

Update a group-specific setting.

PATCH /groups/{groupId}/settings/{directorySettingId}

Optional request headers

Name Description
Authorization Bearer {token}. Required.

Request body

In the request body, supply the values for relevant fields that should be updated.

Property Type Description
values settingValue collection The updated set of values. NOTE: You must supply the entire collection set. You cannot update a single set of values.

Response

If successful, this method returns a 204 No Content response code.

Example

Request

Here is an example of the request.

PATCH https://graph.microsoft.com/beta/settings/3c105fc3-2254-4861-9e2d-d59e2126f3ef
Content-type: application/json

{
    "values": [
        {
            "name": "CustomBlockedWordsList",
            "value": "Contoso"
        }
    ]
}

Response

HTTP/1.1 204 No Content