outlookUser: supportedTimeZonesoutlookUser: supportedTimeZones
Namespace: microsoft.graphNamespace: microsoft.graph
Abrufen der Liste von Zeitzonen, die für den Benutzer unterstützt werden, wie auf dem Postfachserver des Benutzers konfiguriert.Get the list of time zones that are supported for the user, as configured on the user's mailbox server.
Sie können explizit angeben, dass Zeitzonen im Windows-Zeitzonenformat oder im IANA-Format (Internet Assigned Numbers Authority) (auch als Olson-Zeitzone bezeichnet) zurückgegeben werden.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. Das Windows-Format ist die Standardeinstellung.The Windows format is the default.
Beim Einrichten eines Outlook-Clients wählt der Benutzer die bevorzugte Zeitzone aus dieser unterstützten Liste aus.When setting up an Outlook client, the user selects the preferred time zone from this supported list. Sie können anschließend die bevorzugte Zeitzone abrufen, indem Sie die Postfacheinstellungen des Benutzers abrufen.You can subsequently get the preferred time zone by getting the user's mailbox settings.
BerechtigungenPermissions
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie im Artikel zum Thema Berechtigungen.One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
BerechtigungstypPermission type | Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)Permissions (from least to most privileged) |
---|---|
Delegiert (Geschäfts-, Schul- oder Unikonto)Delegated (work or school account) | User.Read, User.ReadBasic.AllUser.Read, User.ReadBasic.All |
Delegiert (persönliches Microsoft-Konto)Delegated (personal Microsoft account) | User.ReadUser.Read |
ApplicationApplication | User.Read.AllUser.Read.All |
HTTP-AnforderungHTTP request
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}')
FunktionsparameterFunction parameters
ParameterParameter | TypType | BeschreibungDescription |
---|---|---|
TimeZoneStandardTimeZoneStandard | timeZoneStandardtimeZoneStandard | Ein Zeitzonenformat.A time zone format. Unterstützte Werte sind: Windows und Iana .Supported values are: Windows , and Iana . Optional.Optional. |
AnforderungsheaderRequest headers
NameName | TypType | BeschreibungDescription |
---|---|---|
AuthorizationAuthorization | stringstring | Bearer {token}. Erforderlich.Bearer {token}. Required. |
AnforderungstextRequest body
Geben Sie für diese Methode keinen Anforderungstext an.Do not supply a request body for this method.
AntwortResponse
Bei erfolgreicher Ausführung gibt die Methode den Antwortcode 200 OK
und eine Sammlung von timeZoneInformation-Objekten im Antworttext zurück.If successful, this method returns 200 OK
response code and a collection of timeZoneInformation objects in the response body.
BeispielExample
Anforderung 1Request 1
Im folgenden Beispiel wird der timeZoneStandard
-Parameter nicht angegeben, und es wird eine Liste unterstützter Zeitzonen abgerufen, die im Windows-Zeitzonenformat dargestellt werden.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
Antwort 1Response 1
Nachfolgend sehen Sie ein Beispiel der Antwort.Here is an example of 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"
}
]
}
Anforderung 2Request 2
Im folgenden Beispiel wird Iana
für den TimeZoneStandard
-Parameter angegeben und die Liste der unterstützten Zeitzonen abgerufen, die im IANA-Format dargestellt werden.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')
Antwort 2Response 2
Nachfolgend sehen Sie ein Beispiel der Antwort.Here is an example of 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"
}
]
}