【问题标题】:Set own event id while creating event using microsoft graph API使用 microsoft graph API 创建事件时设置自己的事件 ID
【发布时间】:2018-03-20 08:45:27
【问题描述】:

我正在使用 Microsoft Graph API 来集成 microsoft/outlook 日历和事件。

API Reference is here 我想在使用这个 REST API 创建事件时为事件指定我自己的自定义 ID,但我没有找到任何方法。它自动创建了一个ID。有什么方法可以指定我们自己的 ID。

以下是我的要求:

POST: https://graph.microsoft.com/v1.0/me/events

 {
   "subject": "My event",
   "start": {
      "dateTime": "2017-10-05T07:57:45.679Z",
      "timeZone": "UTC"
  },
  "end": {
      "dateTime": "2017-10-12T07:57:45.679Z",
      "timeZone": "UTC"
  }
}

【问题讨论】:

    标签: php rest events calendar microsoft-graph-api


    【解决方案1】:

    可以使用可选属性transactionId,参考可以在eventcreate event找到

    请注意,此属性是在第三方应用创建事件时设置的,以后无法更新。

    【讨论】:

      【解决方案2】:

      不,ID 是由 Exchange 创建的,用户无法定义。我能想到的最佳选择是向事件添加扩展属性:

      https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/extended-properties-overview

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多