更新通过图形API递归会议没有工作的结束日期

问题描述 投票:2回答:3

我目前使用的是Office图形API来处理用户压延会议。我有订阅接收通知,如果一个事件是创建,更新和使用“/订阅”要求删除!我的用户使用的是里斯本时区(夏季= UTC + 1,冬天= UTC)

当在Office 365中由用户创建的事件,在我的应用程序的一面,如果事件没有结束日期,我更新的递归会议(通过图形API)会议,所以它有一个结束日期。 [注:我的一个应用程序的规则是,没有会议已超过365天。]

问题:该系列产品是缩水到结束日期,我通过API更新,但时间只剩下了错误的时区。我已经尝试请求API没有时区,我已经要求与时区UTC和时区UTC +1更新,我总是有同样的问题。在办公方面,我更新后,会议时间为一小时少。

下面的图像是系列的一个例子,其具有没有结束范围:

enter image description here

我取更新前的一些子会议,它是正确的。葡萄牙时间变化一天是2019年3月30日,所以30日开始在10h00 UTC和第31天09:00 UTC:

enter image description here

在这里,我将请求发送到Office 365更新复发(结束日期)结束:

enter image description here

发送更新请求后,我获取相同的孩子,2019年3月30日和2019年3月31日当天双双开始为10h00。此更新的客户端日历后会议有错误的开始和结束时间:

enter image description here

我已经试图把在图形API复发时区的领域:UTC,GMT标准时间,只是不要把任何东西,我总是有相同的回报。我解决不了这个问题。

你有任何想法可能是错误的?

office365 microsoft-graph azure-ad-graph-api
3个回答
2
投票

在分辨率方面几经尝试,我很谈得来到Office 365开发团队,并通过负反馈感到惊讶。

他们指出,其实有一个未知的bug在微软API图形在这种特定情况下,他们不能保证这个bug的解决!

他们的建议是,我们使用的Outlook Calendar API Rest API仅适用于这种情况。总之,因为这种未知的错误,微软已经认为我将不得不在我的平台上实现了两种不同的API:因为这个错误的当前Microsoft推荐的Microsoft Graph API,和Outlook日历REST API。

Outlook日历API休息的解决方案:

  1. 创建没有结束日期的重复事件

enter image description here

  1. 检索日历视图

enter image description here

  1. 获取事件的复发

enter image description here

  1. 更新事件

enter image description here

  1. 检索更新后的日历视图

enter image description here


0
投票

实际上,你可以在请求的报头使用

Prefer: outlook.timezone="Central Standard Time"

这样一来,它知道你想与你的计算工作在哪个时区。有关的详细资料,请点击这里https://docs.microsoft.com/en-us/graph/api/user-list-events?view=graph-rest-1.0#support-various-time-zones


0
投票

我不跟在太平洋标准时间的时区或GMT标准时间时区中的用户重现此问题。为了清楚起见,我做的所有测试与邮差,我没有使用Prefer: outlook.timezone头杰里米上述人士指出。

我创建了一个每天,没有尽头预约在下午2太平洋,这是UTC 22:00用户。另外请注意,DST在3月10日这个时间段开始正如你可以看到下面的时间是在两个前和更新后的情况下是正确的。

我也重复了这个同样的事件序列在GMT标准时间时区中的用户(配置像这样在Outlook Web上):

OOW config

我得到了该用户同样的结果。

我建议,当你修补复发总是使用recurrenceTimeZone从原来的复发。你也可以通过最初UTC修补损坏的复发。

获取事件在Outlook后在网络上创建

GET /me/events/{id}&$select=originalStartTimeZone,originalEndTimeZone,start,end,recurrence
{
  "id": "AAMkAGE1NWM...",
  "originalStartTimeZone": "Pacific Standard Time",
  "originalEndTimeZone": "Pacific Standard Time",
  "start": {
    "dateTime": "2019-01-24T22:00:00.0000000",
    "timeZone": "UTC"
  },
  "end": {
    "dateTime": "2019-01-24T22:30:00.0000000",
    "timeZone": "UTC"
  },
  "recurrence": {
    "pattern": {
      "type": "daily",
      "interval": 1,
      "month": 0,
      "dayOfMonth": 0,
      "firstDayOfWeek": "sunday",
      "index": "first"
    },
    "range": {
      "type": "noEnd",
      "startDate": "2019-01-24",
      "endDate": "0001-01-01",
      "recurrenceTimeZone": "Pacific Standard Time",
      "numberOfOccurrences": 0
    }
  }
}

修改之前获取实例

注意在开始/结束时间的转变。

GET /me/events/{id}/instances?startDateTime=2019-03-09T00:00:00&endDateTime=2019-03-11T00:00:00&
$select=originalStartTimeZone,originalEndTimeZone,start,end
{
  "value": [
    {
      "id": "AAMkAGE1NWM...",
      "originalStartTimeZone": "Pacific Standard Time",
      "originalEndTimeZone": "Pacific Standard Time",
      "start": {
        "dateTime": "2019-03-09T22:00:00.0000000",
        "timeZone": "UTC"
      },
      "end": {
        "dateTime": "2019-03-09T22:30:00.0000000",
        "timeZone": "UTC"
      }
    },
    {
      "@odata.etag": "W/\"bReRxUIs3kGIyXXcVJg69AAANf7nZQ==\"",
      "id": "AAMkAGE1NWM...",
      "originalStartTimeZone": "Pacific Standard Time",
      "originalEndTimeZone": "Pacific Standard Time",
      "start": {
        "dateTime": "2019-03-10T21:00:00.0000000",
        "timeZone": "UTC"
      },
      "end": {
        "dateTime": "2019-03-10T21:30:00.0000000",
        "timeZone": "UTC"
      }
    }
  ]
}

更新事件再次发生添加结束日期

请注意,我离开recurrenceTimeZone为相同的值作为原始。

PATCH /me/events/{id}

{
  "recurrence": {
    "pattern": {
      "type": "daily",
      "interval": 1,
      "month": 0,
      "dayOfMonth": 0,
      "firstDayOfWeek": "sunday",
      "index": "first"
    },
    "range": {
      "type": "endDate",
      "startDate": "2019-01-24",
      "endDate": "2020-01-23",
      "recurrenceTimeZone": "Pacific Standard Time",
      "numberOfOccurrences": 0
    }
  }
}

获取修改后的实例

请注意,开始/结束时间仍然正常移动。

GET /me/events/{id}/instances?startDateTime=2019-03-09T00:00:00&endDateTime=2019-03-11T00:00:00&
$select=originalStartTimeZone,originalEndTimeZone,start,end
{
  "value": [
    {
      "id": "AAMkAGE1NWM...",
      "originalStartTimeZone": "Pacific Standard Time",
      "originalEndTimeZone": "Pacific Standard Time",
      "start": {
        "dateTime": "2019-03-09T22:00:00.0000000",
        "timeZone": "UTC"
      },
      "end": {
        "dateTime": "2019-03-09T22:30:00.0000000",
        "timeZone": "UTC"
      }
    },
    {
      "@odata.etag": "W/\"bReRxUIs3kGIyXXcVJg69AAANf7nZQ==\"",
      "id": "AAMkAGE1NWM...",
      "originalStartTimeZone": "Pacific Standard Time",
      "originalEndTimeZone": "Pacific Standard Time",
      "start": {
        "dateTime": "2019-03-10T21:00:00.0000000",
        "timeZone": "UTC"
      },
      "end": {
        "dateTime": "2019-03-10T21:30:00.0000000",
        "timeZone": "UTC"
      }
    }
  ]
}
© www.soinside.com 2019 - 2024. All rights reserved.