| 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 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Update the properties of a specific directory setting object.
[!INCLUDE national-cloud-support]
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.
[!INCLUDE permissions-table]
[!INCLUDE rbac-group-directorysettings-all]
The following permissions are required to update the "Consent Policy Settings" directorySetting object.
[!INCLUDE permissions-table]
Update a tenant-wide setting.
PATCH /settings/{directorySettingId}Update a group-specific setting.
PATCH /groups/{groupId}/settings/{directorySettingId}| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
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. |
If successful, this method returns a 204 No Content response code.
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]
HTTP/1.1 204 No Content