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
  • 以创建者身份转到Office 365 web UI。事件看起来不错,包括附件
  • 以创建者身份查询Microsoft graph API。这项活动看起来不错
    hasAttachments
    true
    ,并通过API列出附件,效果与预期一致
  • 作为收件人转到Office 365 web UI。事件缺少附件(事件的所有其他内容都是准确的)
  • 作为收件人查询Microsoft graph 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
  • 通过POST to
    将文件附加到事件https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events/{eventId}/attachments
  • 通过补丁将步骤1中的活动与与会者一起更新为
    https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events/{eventId}

  • 一些额外的请求,但它完成了工作。

    在添加与会者之前,您是否尝试过添加附件?我怀疑这里的问题是添加附件不会触发发送更新的邀请。我没有。此解决方法解决了此问题。谢谢