Reputation: 21
Is it possible to get a list of users (or user ids) who shared their calendars with the person logged in?
I want to have a list of calendars where I can call as I do with
https://graph.microsoft.com/v1.0/users('user shared the calendar')/calendars
Upvotes: 2
Views: 1031
Reputation: 336
There's a way you can take it one step closer to what you want using the beta endpoint: do a GET /calendars
for the signed-in user, and for each calendar, check the isSharedWithMe
property. If that property is true, the owner property would show the display name and SMTP address of the user who shared the calendar.
Other than the user ID, you can use the SMTP address to index into the users
collection in a tenant as well.
You can see a description of the calendar
properties in the Graph documentation.
Please be aware that isSharedWithMe
, and in general, APIs in the beta endpoint, are subject to change without notice. For that reason, production apps should not take a dependency on such APIs.
Upvotes: 2