Skip to content

Latest commit

 

History

History
136 lines (98 loc) · 4.59 KB

File metadata and controls

136 lines (98 loc) · 4.59 KB
title Get workHoursAndLocationsSetting
description Get the properties and relationships of your own workHoursAndLocationsSetting.
author emilbekj
ms.localizationpriority medium
ms.subservice outlook
doc_type apiPageType
ms.date 12/19/2025

Get workHoursAndLocationsSetting

Namespace: microsoft.graph

Get the properties and relationships of your own workHoursAndLocationsSetting.

[!INCLUDE national-cloud-support]

Permissions

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]

HTTP request

GET /me/settings/workHoursAndLocations

[!INCLUDE me-apis-sign-in-note]

When using the /users/{id} endpoint, the ID must be your own user ID.

GET /users/{id | userPrincipalName}/settings/workHoursAndLocations

Optional query parameters

This method supports the $select OData query parameter to help customize the response.

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a workHoursAndLocationsSetting object in the response body.

Examples

Request

The following example shows a request to get basic work hours and location settings.

GET https://graph.microsoft.com/v1.0/me/settings/workHoursAndLocations

[!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

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"
}