Office365 REST API - Creating a calendar event with attachments

前端 未结 1 1193
野性不改
野性不改 2021-01-14 12:43

I am unable to create a calendar event with attachments using Office365\'s Rest API. Creating events without attachments is not a problem. Trying to create events with attac

相关标签:
1条回答
  • 2021-01-14 13:22

    I see this too! I'm able to post an attachment to the event after it's created, just not include one with the initial create payload.

    So as a workaround, you can create the event, then do

    POST /me/events/{eventid}/attachments
    
    {
      "@odata.type": "#microsoft.graph.fileAttachment",
      "name": "$(fileName)",
      "contentBytes": "$(base64EncodedString)"
    }
    

    I'll check with the calendaring folks on this to see why it's not working during the initial POST.

    0 讨论(0)
提交回复
热议问题