简体   繁体   English

使用microsoft graph api获取sharepoint日历事件的重复数据?

[英]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.

相关问题 尝试使用Sharepoint和Microsoft Graph api获取配置文件信息 - Trying to get profile info using Sharepoint and Microsoft Graph api 如何使用microsoft graph api获取sharepoint中的列(字段) - How to get columns(fields) in sharepoint using microsoft graph api 使用Microsoft Graph API获取SharePoint文件夹和文档 - Get SharePoint folders and docs using Microsoft Graph API 如何使用 Microsoft Graph 获取 SharePoint 在线组 API - How to get SharePoint online Groups using Microsoft Graph API 使用 Microsoft Graph API 从 SharePoint 在线获取文件 - Get a file from SharePoint Online using Microsoft Graph API 如何使用 Microsoft Graph 或 SharePoint API 获取每个 SharePoint 站点的大小? - How to get the size of each SharePoint site using Microsoft Graph or SharePoint API? 我可以使用 Microsoft Graph 访问 Sharepoint 日历吗? - Can I access a Sharepoint calendar using Microsoft Graph? 如何使用 Microsoft Graph API 和 Graph Client 添加 SharePoint 选项卡? - How to add a SharePoint tab using Microsoft Graph API and Graph Client? 尝试使用Sharepoint和Microsoft Graph API获取通用列表的所有记录 - Trying to get all records of a generic list using Sharepoint and Microsoft Graph api 使用REST API从SharePoint日历中检索事件 - Retrieve the events from a SharePoint calendar using REST API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM