Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get user's time zone in Graph

Currently, need to get a user's office location and then convert that into a time zone, or is there a way to obtain the user's time zone Graph?

like image 735
CSE Feedback Avatar asked Oct 22 '25 03:10

CSE Feedback


2 Answers

Mailbox settings has a timezone property.

https://graph.microsoft.com/v1.0/me/mailboxsettings
like image 143
Darrel Miller Avatar answered Oct 26 '25 19:10

Darrel Miller


According to your descriptions, I assume you want to get the user's time zone by Graph.

In this document, we can get the user's mailbox Settings. We can use the API like this:

GET /me/mailboxSettings/timeZone

or

GET /users/{id|userPrincipalName}/mailboxSettings/timeZone

It will return the user's mailbox time zone settings. The response like this:

{
"@odata.context": "https://graph.microsoft.com/v1.0/XXX/mailboxSettings/timeZone",
"value": "China Standard Time"
}
like image 44
Keen Jin Avatar answered Oct 26 '25 19:10

Keen Jin