Office365 REST API-日历事件附件对于收件人不可见
端点似乎有问题。附加到日历事件的文件对日历收件人不可见。附件对事件创建者可见。直到最近,我的代码已经运行了几个月,这让我相信这是一种倒退 复制步骤Office365 REST API-日历事件附件对于收件人不可见,office365,microsoft-graph-api,outlook-restapi,Office365,Microsoft Graph Api,Outlook Restapi,端点似乎有问题。附加到日历事件的文件对日历收件人不可见。附件对事件创建者可见。直到最近,我的代码已经运行了几个月,这让我相信这是一种倒退 复制步骤 必须有两个用户-创建者和收件人 通过https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events 通过将文件附加到事件https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events/{eventId}/attach
https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events
将文件附加到事件https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events/{eventId}/attachments
hasAttachments
为true
,并通过API列出附件,效果与预期一致hasAttachments
为false
,您不能使用graph API列出附件。为了获取收件人的事件ID,我查询了/calendarView
端点。它返回的事件id与步骤4中的事件不同,但对象的其余部分匹配(iCalUId、subject、开始/结束时间等)…除了hasAttachments
/users/{userId}
端点而不是/me
端点创建事件并附加文件,结果相同
我还尝试了添加附件beta端点,但收到以下错误:
{
"error": {
"code": "NavigationNotSupported",
"message": "Recursive navigation is not allowed after property 'Events' according to the entity schema.",
"innerError": {
"request-id": “{uuid}”,
"date": "2018-06-06T06:28:47"
}
}
}
Marc的解决方法解决了这个问题-在附件之后添加与会者。工作流程如下所示:
https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events
将文件附加到事件https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events/{eventId}/attachments
https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events/{eventId}
一些额外的请求,但它完成了工作。在添加与会者之前,您是否尝试过添加附件?我怀疑这里的问题是添加附件不会触发发送更新的邀请。我没有。此解决方法解决了此问题。谢谢