将事件与另一个事件附加为项附件创建

时间:2018-03-26 06:42:59

标签: json microsoft-graph

我按照这个document将一个事件与另一个事件作为项目附件附加,但我发现该字段是组织者'在请求体中,服务器将响应错误。

然而,'是组织者'是event集合的成员,我可以成功创建一个包含此字段的事件。

是一个bug还是itemAttachment api的任何限制?

以下是我的测试步骤。

步骤1. POST / me / events / $ {event_id} / attachments

{   
    "@odata.type": "#microsoft.graph.itemAttachment",   
    "name": "Holiday event22222",    
    "item": {
        "@odata.type": "microsoft.graph.event",
        "subject": "Discuss gifts for children",
        "body": {
            "contentType": "HTML",
            "content": "Let's look for funding!"
         },
         "start": {
             "dateTime": "2016-12-02T18:00:00",
             "timeZone": "Pacific Standard Time"
          },
          "end": {
             "dateTime": "2016-12-02T19:00:00",
             "timeZone": "Pacific Standard Time"
          },
          "isOrganizer": true,
          "organizer": {
              "emailAddress": {
                  "name": "XXX YYY",
                  "address": "xxxyyy@mydomain.onmicrosoft.com"
        }
    }   
    } 
}

步骤2.服务器响应400错误。

{
    "error": {
        "code": "ErrorInvalidPropertySet",
        "message": "Set action is invalid for property.",
        "innerError": {
            "request-id": "5f296510-1c47-4621-ae61-f3caff28a19d",
            "date": "2018-04-03T02:28:36"
        }
    }
}

1 个答案:

答案 0 :(得分:0)

如果邮件发件人也是组织者,则isOrganizer设置为true。它不是一个可设定的值,它是一个计算值。

此外,在您的示例中,您未指定organizer值,因此我不确定服务器如何确定谁isOrganizer也会引用。