| title | outlookUser: supportedTimeZones |
|---|---|
| description | Get the list of time zones that are supported for the user, as configured on the user's mailbox server. |
| ms.localizationpriority | medium |
| author | SuryaLashmiS |
| ms.subservice | outlook |
| doc_type | apiPageType |
| ms.date | 06/21/2024 |
Namespace: microsoft.graph
Get the list of time zones that are supported for the user, as configured on the user's mailbox server.
You can explicitly specify to have time zones returned in the Windows time zone format or Internet Assigned Numbers Authority (IANA) time zone (also known as Olson time zone) format. The Windows format is the default.
When setting up an Outlook client, the user selects the preferred time zone from this supported list. You can subsequently get the preferred time zone by getting the user's mailbox settings.
[!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]
GET /me/outlook/supportedTimeZones
GET /users/{id|userPrincipalName}/outlook/supportedTimeZones
GET /me/outlook/supportedTimeZones(TimeZoneStandard=microsoft.graph.timeZoneStandard'{timezone_format}')
GET /users/{id|userPrincipalName}/outlook/supportedTimeZones(TimeZoneStandard=microsoft.graph.timeZoneStandard'{timezone_format}')| Parameter | Type | Description |
|---|---|---|
| TimeZoneStandard | timeZoneStandard | A time zone format. Supported values are: Windows, and Iana. Optional. |
| Name | Type | Description |
|---|---|---|
| Authorization | string | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns 200 OK response code and a collection of timeZoneInformation objects in the response body.
The following example does not specify the timeZoneStandard parameter, and gets the list of supported time zones represented in the Windows time zone format.
GET https://graph.microsoft.com/v1.0/me/outlook/supportedTimeZones
[!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#Collection(microsoft.graph.timeZoneInformation)",
"value":[
{
"alias":"Dateline Standard Time",
"displayName":"(UTC-12:00) International Date Line West"
},
{
"alias":"Samoa Standard Time",
"displayName":"(UTC+13:00) Samoa"
},
{
"alias":"UTC-11",
"displayName":"(UTC-11:00) Coordinated Universal Time-11"
},
{
"alias":"Aleutian Standard Time",
"displayName":"(UTC-10:00) Aleutian Islands"
}
]
}The following example specifies Iana for the TimeZoneStandard parameter, and gets the list of supported time zones represented in IANA format.
GET https://graph.microsoft.com/v1.0/me/outlook/supportedTimeZones(TimeZoneStandard=microsoft.graph.timeZoneStandard'Iana')
[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
[!INCLUDE snippet-not-available] [!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#Collection(microsoft.graph.timeZoneInformation)",
"value":[
{
"alias":"Etc/GMT+12",
"displayName":"Etc/GMT+12"
},
{
"alias":"US/Samoa",
"displayName":"US/Samoa"
},
{
"alias":"Etc/GMT+11",
"displayName":"Etc/GMT+11"
},
{
"alias":"US/Aleutian",
"displayName":"US/Aleutian"
}
]
}