Outlook 365 Accessing Calendars in Service Account via REST API

713 views Asked by At

I have set up an office 365 Service Account with several calendars linked. when I get a list of calendars or calendargroups from the REST API the linked calendars do not show up, though they are clearly there in the web interface under 'Your Calendars' the only groups I get back are 'My Calendars' and 'Other Calendars' what am I missing?

1

There are 1 answers

3
Jason Johnston On

The question of your authentication aside, the way you access calendars that other people have shared with you via the REST API is to access it in their mailbox.

So if [email protected] shared his calendar with you, you would have to do:

GET https://outlook.office.com/api/v2.0/users/[email protected]/events

There is no way to get a list of all the calendars shared with you, so you would need to either know that before hand or prompt the user to provide the information.