我正在使用新的Office 365 API预览版的其余服务。
我的问题发生在我查询用户的事件时(例如: https://outlook.office365.com/ews/odata/Me/Calendar/Events ),当我这样做时,我设法检索一些数据为事件列表包括开始日期,结束日期,主题,位置,但我无法检索事件的与会者列表。列表总是空的(又名“参加者”:[],)即使我可以通过GUI(在线或通过客户端)看到此事件的其他人。仅供参考,我是0365租户的所有者。
有没有办法检索与会者列表?这是一个正确的问题还是由于api的预览特性?
感谢您的时间。
答案 0 :(得分:0)
我确实可以重现你说的话。
甚至不能直接调用REST服务,我可以让任何与会者出现。有无扩展。
刚才意识到,如果您要求特定的日历活动,那么您确实会获得与会者列表。不知道为什么它不符合odata并且可以扩展为包含在事件结果集中。
下面' S的你所得到的,如果调用https://outlook.office365.com/EWS/OData/Users示例(' admin@sjkpdevs.onmicrosoft.com')/活动(' AAMkADgxZDFhOTkwLTdhZTEtNGI0Yy05OWM4LTgxYjU2NGJjOTM5NQBGAAAAAAAZ8w1ex-72T6eE6TA1YJtABwDcr4oH_FfeToL0_U0uRIeqAAAAAAEOAADcr4oH_FfeToL0_U0uRIeqAAATh3axAAA =& #39)
{"@odata.context":"https://outlook.office365.com/EWS/OData/$metadata#Users('admin%40sjkpdevs.onmicrosoft.com')/Events/$entity","@odata.id":"https://outlook.office365.com/EWS/OData/Users('admin@sjkpdevs.onmicrosoft.com')/Events('AAMkADgxZDFhOTkwLTdhZTEtNGI0Yy05OWM4LTgxYjU2NGJjOTM5NQBGAAAAAAAZ8w1ex-72T6eE6TA1YJtABwDcr4oH_FfeToL0_U0uRIeqAAAAAAEOAADcr4oH_FfeToL0_U0uRIeqAAATh3axAAA=')","@odata.etag":"W/\"3K+KB/hX3k6C9PlNLkSHqgAAE4eIQw==\"","@odata.editLink":"https://outlook.office365.com/EWS/OData/Users('admin@sjkpdevs.onmicrosoft.com')/Events('AAMkADgxZDFhOTkwLTdhZTEtNGI0Yy05OWM4LTgxYjU2NGJjOTM5NQBGAAAAAAAZ8w1ex-72T6eE6TA1YJtABwDcr4oH_FfeToL0_U0uRIeqAAAAAAEOAADcr4oH_FfeToL0_U0uRIeqAAATh3axAAA=')","Id":"AAMkADgxZDFhOTkwLTdhZTEtNGI0Yy05OWM4LTgxYjU2NGJjOTM5NQBGAAAAAAAZ8w1ex-72T6eE6TA1YJtABwDcr4oH_FfeToL0_U0uRIeqAAAAAAEOAADcr4oH_FfeToL0_U0uRIeqAAATh3axAAA=","ChangeKey":"3K+KB/hX3k6C9PlNLkSHqgAAE4eIQw==","Subject":"Meeting","BodyPreview":"","Body":{"ContentType":"HTML","Content":"<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<style type=\"text/css\" style=\"display:none\"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>\r\n</head>\r\n<body dir=\"ltr\">\r\n<div id=\"OWAFontStyleDivID\" style=\"font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;\">\r\n<p><br>\r\n</p>\r\n</div>\r\n</body>\r\n</html>\r\n"},"Importance":"Normal","Categories":[],"HasAttachments":false,"Start":"2014-06-22T19:30:00Z","End":"2014-06-22T20:00:00Z","Location":{"DisplayName":""},"ShowAs":"Busy","IsAllDay":false,"IsCancelled":false,"IsOrganizer":true,"ResponseRequested":true,"Type":"SingleInstance","SeriesId":null,"Attendees":[{"Name":"mail@sjkp.dk","Address":"mail@sjkp.dk","Status":{"Response":"Accepted","Time":"2014-06-22T19:55:38Z"},"Type":"Required"}],"Recurrence":null,"Attachments@odata.navigationLink":"https://outlook.office365.com/EWS/OData/Users('admin@sjkpdevs.onmicrosoft.com')/Events('AAMkADgxZDFhOTkwLTdhZTEtNGI0Yy05OWM4LTgxYjU2NGJjOTM5NQBGAAAAAAAZ8w1ex-72T6eE6TA1YJtABwDcr4oH_FfeToL0_U0uRIeqAAAAAAEOAADcr4oH_FfeToL0_U0uRIeqAAATh3axAAA=')/Attachments","Calendar@odata.navigationLink":"https://outlook.office365.com/EWS/OData/Users('admin@sjkpdevs.onmicrosoft.com')/Events('AAMkADgxZDFhOTkwLTdhZTEtNGI0Yy05OWM4LTgxYjU2NGJjOTM5NQBGAAAAAAAZ8w1ex-72T6eE6TA1YJtABwDcr4oH_FfeToL0_U0uRIeqAAAAAAEOAADcr4oH_FfeToL0_U0uRIeqAAATh3axAAA=')/Calendar"}
答案 1 :(得分:0)
目前,为了在ODATA API中获取事件的参加者,您需要对从事件实体集返回的各个事件进行GET。