| title | Update workHoursAndLocationsSetting |
|---|---|
| description | Update the properties of your own workHoursAndLocationsSetting. |
| author | emilbekj |
| ms.localizationpriority | medium |
| ms.subservice | outlook |
| doc_type | apiPageType |
| ms.date | 12/19/2025 |
Namespace: microsoft.graph
Update the properties of your own workHoursAndLocationsSetting.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
PATCH /me/settings/workHoursAndLocations[!INCLUDE me-apis-sign-in-note]
When using the /users/{id} endpoint, the ID must be your own user ID.
PATCH /users/{id | userPrincipalName}/settings/workHoursAndLocations| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
[!INCLUDE table-intro]
| Property | Type | Description |
|---|---|---|
| maxSharedWorkLocationDetails | maxWorkLocationDetails | Controls the level of work location details that can be shared with colleagues. Supports a subset of the values of maxSharedWorkLocationDetails. The possible values are: none, approximate, specific. |
If successful, this method returns a 200 OK response code and an updated workHoursAndLocationsSetting object in the response body.
The following example shows a request to update the maximum level of work location details that can be shared.
PATCH https://graph.microsoft.com/v1.0/me/settings/workHoursAndLocations
Content-Type: application/json
{
"maxSharedWorkLocationDetails": "approximate"
}[!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]
The following example shows the response.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('12345678-1234-1234-1234-123456789012')/settings/workHoursAndLocations/$entity",
"maxSharedWorkLocationDetails": "approximate"
}