0

Looking through the graph api and I can list appointments with the start time and end time in the calendars time-zone.

Can I find the calendar's time-zone without looking at an existing appointment? I would expect it to be in the bookingBusinesses/{id} resource.

We have several calendars in several timezones and working through an algorithm to figure out available timeslots. Obviously "Day 0" is the worst - no appointment = no timezone data. We can work around it by creating one appointment. Is there a better way though?

Dev
  • 2,428
  • 2
  • 14
  • 15
MarkD
  • 1,511
  • 18
  • 32
  • Not that i remember at this point, but the above approach may work. If the feature doesn't exists and you want this feature to be implemented by Microsoft then consider filing an [uservoice/feature request](https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform). – Dev Sep 03 '21 at 16:42
  • thanks, done, if anyone wants to support it, here: https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/add-timezone-info-the-the-bookingsbusiness/idi-p/2718931#M301 – MarkD Sep 04 '21 at 00:06
  • I will move it to the answer. Glad that you did that @MarkD & sharing back to the community. So that others can vote for it. – Dev Sep 04 '21 at 03:30

1 Answers1

0

You cannot fetch the time zone of the Calendar however you can fetch the time zone of User mailbox that owns the Calendars. AFAIK calendars don't even have their own independent time zone settings but refer the parent user mailbox's time zone setting.

The User.mailboxSettings API can be used to fetch timezone preference of the Calendar

curl -X GET 'https://graph.microsoft.com/v1.0/users/john.smith@contoso.com/mailboxSettings/timeZone'

Here is the official documentation. https://learn.microsoft.com/en-us/graph/api/resources/mailboxsettings?view=graph-rest-1.0

It is worth noting that the timezone values format follows Windows Timezones. Your programming platform may not be following the same and might be using IANA timezone format, then you would need to translate windows timezone to IANA timezone

Monish Sen
  • 1,773
  • 3
  • 20
  • 32