I am building an application for users to access their calendars over multiple providers. I have an integration with Office 365 using the Graph API.
I currently use delegated permissions and the /me/calendars endpoint to fetch the data.
This works fine for personal calendars created inside outlook, but it does not work well for shared and external calendars. My goal is that the calendars (and events) that the user sees in the native outlook interface are the same that the user sees in my app.
As far as I am aware, these are the various ways that a calendar can be shared in the Microsoft ecosystem:
- Explicit user share
- Permission:
Calendar.Read - If the Owner explicitly shares a calendar with another user it will appear in
/me/calendars - That is perfect for me, but most users don't do that
- Permission:
- Implicit organization share
- Permission:
Calendar.Read - By default all members of the organization can see the free/busy of other members. Users add them via the
Add from directorytab in outlook. - This allows us to query
/me/calendar/getschedulewith a list of users to get some events - This is problematic because I do not know which members my user "follows" in outlook
- Permission:
- Explicit organization share
- Permission:
Calendar.Read.Shared - If the Owner changes the sharing to
can view all detailsthen we can access/users/{USER_ID}/calendars - This is again problematic because I do not know which members my user "follows" in outlook and it requires a manual step by other members
- Permission:
- Group calendar
- Permission:
Group.Read.All - This allows access to
/group/{GROUP_ID}/calendar - This is once more problematic because I do not know which groups my user "follows" in outlook
- Permission:
- External calendar
- No idea how to access those, they don't show up in
/me/calendars
- No idea how to access those, they don't show up in
So my question is: Did I miss something that would allow all those various calendars to show up in a single unified API call (preferably in /me/calendars)? Otherwise, is it possible to know which calendars my user "follows" on outlook?
At the end of the day, my users don't care how the calendar was shared with them on outlook but they do complain if one calendar (say in People's calendars group) is not showing up in my app. The documentation on shared calendars is quite lacking and I reviewed all other SO posts without much luck.
Thanks a lot!