I am trying to create a web app whose primary task is to fetch an appointment with another user. I need to fetch an appointment on outlook calendar.
I am working with Microsoft Rest APIs directly from the web and using npm module - msal from official Azure AD.
Using this I have been able to allow the user to choose and login in to a microsoft account and then fetch the user's email details.
I however, would like the user to see the calendar details of another user (the way we can see someone's calendar availability in outlook). Basically, I need to subscribe to someone's calendar so that I can fetch latest snapshot of the calendar whenever required.
I have tried to explore various APIs in the official wiki document and microsoft documentation. However, I couldn't find any way of achieving it.
Am I wrong in assuming that this can be achieved ? I have even tried to share calendar, but it didn't help.
Can someone please suggest me how to achieve this or direct me to some article on this.
if the other user has shared their calendar with the user logged into your app, then you can achieve this. https://learn.microsoft.com/en-us/graph/outlook-get-shared-events-calendars
As per the api definition, https://learn.microsoft.com/en-us/graph/api/calendar-get?view=graph-rest-1.0&tabs=http
There are 2 scenarios where you can access another user's calendar, that is, the above, or you give the app permissions to read all users.
There are two scenarios where an app can get another user's calendar:
If the app has application permissions, or, If the app has the appropriate delegated permissions from one user, and another user has shared a calendar with that user, or, has given delegated access to that user. See details and an example.