Office365 Unified API, get calendar ID from Events ID

空扰寡人 提交于 2019-12-02 08:24:59

Question seems quite old, but in case someone is having same issues, there is some good and bad news.

Good news: graph entities, no exception Event, have so called relationships (see docs). To get relationship data you just need to append relationship name to the end of request path. In our case:

GET https://graph.microsoft.com/beta/me/Events/< ID >/calendar

Bad news: in this particular case, it will always return user's calendar. It could be OK in some scenarios, but if you are playing with group calendars, then it will not help. It appears that O365 is creating "clone" events to user calendar. Try modifying it from Outlook (at least tried online version) and you will see, that now you have two different events - one in user's calendar, another in a group. Kind of weird logic, but probably it has some rationale. What is really bad - it seems there is no way to get "master" instance of group event (having personal event "clone").

Yes you achive this without using Beta API.

https://graph.microsoft.com/v1.0/me/events/<event-id>

you can also apply a filter in this

https://graph.microsoft.com/v1.0/me/events/<eventid>/?startDateTime=<startDate> &endDateTime=<endDate>

You're right, the API doesn't currently expose this. I think it's a good suggestion though, you should post feedback at http://officespdev.uservoice.com/.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!