0
votes

I'm fetching events from the Microsoft Graph API: https://graph.microsoft.com/v1.0/me/events/.

But the event object doesn't include any information about the calendar where it came from, where it belongs.

{ "@odata.etag": "W/\"VdMXVdJPi0Svr+Ahlbtc8WAAF++CrQ==\"", "id": "AQMkADAwATM0MDAAMS6wZmQ0LTZkNjItMDACLTAwCgBGAAADJYZccw8wNUCHxKfq_uQ8CQcAVdMXVdJPi0SvrwDgIZW7XPMAAAIBDQAAAFXTF1XST4tEr68A4CGVu1zzAAAAF-EXzwAAAA==", "subject": "test event title" }

Is there any way to get the Id of the calendar in the event object?

Thanks

2

2 Answers

2
votes

Yep, the event object has a navigation property called calendar which shows the calendar that contains the event:

https://graph.microsoft.com/v1.0/me/events/{eventid}/calendar

0
votes

Is not possible to include the Calendar object inside the Event. Microsoft Graph has the query parameter $expand that we can use to include navigation/reference properties in the object. But in the version 1.0 of the API this parameter is not fully supported and even in the version beta, the Calendar object is still not supported. Hope that Microsft adds this support, the $expand parameter for the Calendar property in the Event object.