[英]Get recurrence data of sharepoint calendar events using microsoft graph api?
Is there a way to get recurrence information of sharepoint calendar events using the graph api?有没有办法使用图形 api 获取共享点日历事件的重复信息? I can get the event fields using this endpoint but I could not figure out a way to get event recurrence data of sharepoint calendar event using graph api.
我可以使用此端点获取事件字段,但我无法找到使用图形 API 获取共享点日历事件的事件重复数据的方法。
If there's no way to do that, is there any documentation regarding working with sharepoint calendars?如果没有办法做到这一点,是否有任何关于使用共享点日历的文档? I could not really find any official documentation for it.
我真的找不到任何官方文档。
Not sure about Graph, but here's what I know. 不确定Graph,但这就是我所知道的。 There has always been a problem when it comes to expanding the recurrence data in calendar events - AFAIK there is no way to retrieve this piece of info using JSOM nor REST for item collections.
在日历事件中扩展重复数据时始终存在问题-AFAIK无法使用JSOM或REST来收集项目的信息。 It is possible though to get this information for a single item in a form of an XML.
但是,有可能以XML的形式获取单个项目的此信息。 All you have to do is to fetch and read the
RecurrenceData
property of an item. 您要做的就是获取并读取项目的
RecurrenceData
属性。 Example endpoint URL: 端点网址示例:
https://[tenantUrl]/_api/web/lists/getByTitle('Events')/items(1)?$select=Title,RecurrenceData
It will return something like the following in the RecurrenceData
field: 它将在
RecurrenceData
字段中返回类似以下内容的内容:
<recurrence>
<rule>
<firstDayOfWeek>su</firstDayOfWeek>
<repeat><daily dayFrequency="1" /></repeat>
<repeatInstances>10</repeatInstances>
</rule>
</recurrence>
You can try to fetch that property using the provided Graph endpoint but I don't know what the result will be and unfortunately I don't have a way to check it right now - sorry! 您可以尝试使用提供的Graph端点来获取该属性,但是我不知道结果将是什么,不幸的是,我现在无法检查它-抱歉!
Also, have a look at this thread on the SharePoint StackExchange: https://sharepoint.stackexchange.com/questions/23221/rest-api-expand-recurring-calendar-events?noredirect=1&lq=1 另外,请查看SharePoint StackExchange上的以下线程: https ://sharepoint.stackexchange.com/questions/23221/rest-api-expand-recurring-calendar-events ? noredirect =1& lq =1
I've also recently stumbled upon a neat little library on Reddit, which simplifies common calendar tasks and allows to get this info using SOAP service. 我最近还偶然发现了Reddit上一个简洁的小库,该库简化了常见的日历任务,并允许使用SOAP服务获取此信息。 You can find it here: https://spcalendarpro.sharepointhacks.com/
您可以在这里找到它: https : //spcalendarpro.sharepointhacks.com/
这就是我使用 Graph API 为 Azure 中的 SharePoint 日历列表获取 RecurrenceData 的方法:
/v1.0/sites/root/lists/<list_guid>/items?$expand=fields($select=Title,RecurrenceData)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.