Outlook 事件 API:至少有一个 属性 验证失败错误

Outlook Event API : At least one property failed validation error

我正在通过 Outlook API 创建 Outlook 事件,方法是提供以下 JSON 输入:

{  
   "subject":"bla bla bla",
   "start":{  
      "dateTime":"2018-01-14T17:00:00",
      "timeZone":"India Standard Time"
   },
    "Attendees": [
    {
      "EmailAddress": {
        "Address": "janets@a830edad9050849NDA1.onmicrosoft.com",
        "Name": "Janet Schorr"
      },
      "Type": "Required"
    }
  ]
}

但是我收到以下错误响应:

{
    "error": {
        "code": "ErrorPropertyValidationFailure",
        "message": "At least one property failed validation.",
        "innerError": {
            "request-id": "6f3d1676-77cc-49b0-87a2-b96b6ed1f15d",
            "date": "2018-01-12T05:25:10"
        }
    }
}

如果我在上面JSON中传递了结束属性,事件创建成功。下面的 JSON 工作正常:

{  
   "subject":"bla bla bla",
   "start":{  
      "dateTime":"2018-01-14T17:00:00",
      "timeZone":"India Standard Time"
   },
   "end":{  
          "dateTime":"2018-01-14T17:00:00",
          "timeZone":"India Standard Time"
       },
    "Attendees": [
    {
      "EmailAddress": {
        "Address": "janets@a830edad9050849NDA1.onmicrosoft.com",
        "Name": "Janet Schorr"
      },
      "Type": "Required"
    }
  ]
}

创建事件需要传递结束属性吗?还是上面的JSON输入有问题?

是的,end 是必需的。 Outlook/Exchange 不支持没有结束日期的活动:)