从 Office 365 日历中获取所有事件

Fetch all events From Office 365 Calendar

我需要获取 Office 365 日历中的所有事件。

当前 GET 请求:

https://graph.microsoft.com/v1.0/users/{userPrincipalName}/事件

当我们调用 API

时,

returns 只有 10 个事件

先统计事件的数量,然后用 $top 查询参数再调用一次怎么样?

https://graph.microsoft.com/v1.0/users/me/events?$count=true

上面的api给你的事件数为“@odata.count”:173(例如)然后你调用:

https://graph.microsoft.com/v1.0/users/me/events?$top=173