Office 365 API recurring meetings not always returning

我与影子孤独终老i 提交于 2020-01-04 09:19:33

问题


I'm trying to use the office 365 rest APIs (http://msdn.microsoft.com/en-us/library/office/dn792114(v=office.15).aspx#sectionSection3) to retrieve a users calendar events for a specific date. Currently I am running the query below:

https://outlook.office365.com/ews/odata/Me/Events?$select=Start,End,IsAllDay,Subject&$filter=Start+ge+2014-09-10T05%3A00%3A00Z+and+Start+le+2014-09-11T04%3A59%3A59Z

This works perfectly for 'SingleInstance' and 'SeriesMaster' Type meeting instances; however, I am seeing some strange behavior with recurring meetings. For only some users any 'Occurrences' type meetings (a specific occurrence of a recurring meeting) are not returned from the API call; even if the meeting displays on their calendar in the OWA portal. Other users see recurring and non-recurring meetings as expected.

As a test I created a recurring meeting and invited users who were reporting the issue and users who were getting the expected response and then ran the query again for all users. That meeting followed the pattern described above with users either seeing all of the expected occurrences or no recurring meeting occurrences.

Has anyone else come across this? Is there a better way to get all meeting events for a specific date range?


回答1:


Change the name of the first parameter to "End", i.e.:

https://outlook.office365.com/ews/odata/Me/Events?$select=Start,End,IsAllDay,Subject&$filter=End+ge+2014-09-10T05%3A00%3A00Z+and+Start+le+2014-09-11T04%3A59%3A59Z

I know, it is bizarre but the only way to retrieve a complete list of events within a date range is to have the "End" argument first followed by the "Start".

$filter=End ge {0} and Start le {1}

Note: the API could change in the near future and none of this will longer apply.




回答2:


Thanks for your question! Can you please try your query with the following change marked in bold?

https://outlook.office365.com/ews/odata/Me/Events?$select=Start,End,IsAllDay,Subject&$filter=End+ge+2014-09-10T05%3A00%3A00Z+and+Start+le+2014-09-11T04%3A59%3A59Z

This returns all occurrences of recurring meetings that fall within the time range you have specified, in addition to single meetings. Having said that, we are aware that the current method for retrieving all events (single and recurring meeting occurrences) in a specified time period isn't intuitive, and are working to address this.

Please let me know if you have any questions or need more info.

Thanks,

Venkat



来源:https://stackoverflow.com/questions/25810854/office-365-api-recurring-meetings-not-always-returning

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