How to get user timezone .NET Core Graph SDK

Bumin Asano 1 Reputation point


I am doing the Graph tutorial, but I get an error because the "MailboxSettings.TimeZone" value is null and the timezone of the account logged in as a test is not set.

What if an account without a time zone can exist normally, such as a test account? Of course, I think these accounts are a very peculiar case, but I think it's a possible pattern, assuming you access my apps with an admin account.

  1. Is it possible with a regular user or administrator account?
  2. If possible, is there a way to avoid it?


Thank you.

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

1 answer

Sort by: Most helpful
  1. Deva-MSFT 2,256 Reputation points Microsoft Employee

    In general, the users can set the time zone they prefer on any Outlook client, by choosing from the supported time zones that their administrator has set up for their mailbox server. So when you make GET operation then it returns the user's preferred time zone in the format that the administrator has set up.

    1 person found this answer helpful.