简体   繁体   中英

Microsoft Graph: Get calendar info within the events

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM