Share via

Issue with getting time zone for users in Graph API

Lluis Fons 1 Reputation point
Jun 10, 2022, 1:12 PM

Hi! I am the founder of teamtimezone.com. We want to support Microsoft Teams because some users asked us to support MS Teams since they may be planning to move from Slack to MS Teams and would like to continue using our application.

Our team started to work on that but we found a blocker that does not allow us to successfully port the application. It seems that, at the moment, there is not a reliable way to access a user's time zone.

We have verified the options to get this time zone of a given user and see that there is an option in graph API - But, We see that this is not giving any value in our prod tenant https://learn.microsoft.com/en-us/graph/api/regionalandlanguagesettings-get?view=graph-rest-beta&tabs=http#code-try-1

We would like to know when this endpoint will be production-ready so we can successfully port the app :)

Alternatively, please let us know if you know of any other ways to fetch the time zone of a given user.

With gratitude,

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,494 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,761 Reputation points Microsoft External Staff
    Jun 10, 2022, 4:00 PM

    Hi @Lluis Fons ,

    Currently regionalandlanguagesettings is in /beta and APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

    As per my test PUT or PATCH /settings/regionalAndLanguageSettings and then GET /settings/regionalAndLanguageSettings works fine, here is my test response.
    210329-884829-get.jpg

    Note: Using GET without PUT or PATCH will return empty responses!!

    Alternatively, consider GET /users/{id|userPrincipalName}/mailboxSettings refer Get user mailbox settings.

    Which will return the timeZone of users mailbox.

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.