| title | workPlanOccurrence: setCurrentLocation |
|---|---|
| description | Update your work location for the current day or current active segment. |
| author | emilbekj |
| ms.localizationpriority | medium |
| ms.subservice | outlook |
| doc_type | apiPageType |
| ms.date | 12/19/2025 |
Namespace: microsoft.graph
Update your work location for the current day or current active segment. This action allows you to quickly update your work location without modifying individual occurrences.
[!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]
POST /me/settings/workHoursAndLocations/occurrences/setCurrentLocation[!INCLUDE me-apis-sign-in-note]
When using the /users/{id} endpoint, the ID must be your own user ID.
POST /users/{id | userPrincipalName}/settings/workHoursAndLocations/occurrences/setCurrentLocation| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
In the request body, provide a JSON object with the following parameters.
| Parameter | Type | Description |
|---|---|---|
| placeId | String | Identifier of a place from the Microsoft Graph Places Directory API. Only applicable when workLocationType is set to office. |
| updateScope | workLocationUpdateScope | The scope of the update. Supports a subset of the values of workLocationUpdateScope. The possible values are: currentSegment, currentDay. |
| workLocationType | workLocationType | The new work location type to set. Supports a subset of the values of workLocationType. The possible values are: office, remote. |
| Member | Description |
|---|---|
| currentSegment | Update only the current time segment. |
| currentDay | Update the entire current day. |
| unknownFutureValue | Evolvable enumeration sentinel value. Don't use. |
If successful, this action returns a 204 No Content response code.
The following example shows how to set the current location to office.
The following example shows a request.
POST https://graph.microsoft.com/v1.0/me/settings/workHoursAndLocations/occurrences/setCurrentLocation
Content-type: application/json
{
"updateScope": "currentDay",
"workLocationType": "office",
"placeId": "12345678-1234-1234-1234-123456789012"
}[!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 204 No ContentThe following example shows how to set the current location to remote.
The following example shows a request.
POST https://graph.microsoft.com/v1.0/me/settings/workHoursAndLocations/occurrences/setCurrentLocation
Content-type: application/json
{
"updateScope": "currentSegment",
"workLocationType": "remote"
}[!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 204 No Content