How to get user timezone .NET Core Graph SDK

Bumin Asano 1 Reputation point
2020-12-05T16:40:30.493+00:00

Hello

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?

45358-%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2020-12-06-13229.png

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
    2020-12-06T18:04:57.44+00:00

    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.