Skip to content

Latest commit

 

History

History
145 lines (109 loc) · 4.84 KB

File metadata and controls

145 lines (109 loc) · 4.84 KB
title Update directorySetting
description Update the properties of a specific directory setting object.
author yuhko-msft
ms.reviewer mbhargav, khotzteam, aadgroupssg
ms.localizationpriority medium
ms.subservice entra-directory-management
doc_type apiPageType
ms.date 04/04/2024

Update directorySetting

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Update the properties of a specific directory setting object.

[!INCLUDE national-cloud-support]

Permissions

The following tables show the least privileged permission or permissions required to call this API on each supported resource type. Follow best practices to request least privileged permissions. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

For all settings except the Consent Policy Settings object

[!INCLUDE permissions-table]

[!INCLUDE rbac-group-directorysettings-all]

For the Consent Policy Settings object

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

[!INCLUDE permissions-table]

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. Learn more about authentication and authorization.

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

The following example shows a request.

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

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

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

HTTP/1.1 204 No Content