无法在findMeetingTimes

时间:2018-01-11 00:32:26

标签: office365 microsoft-graph outlook-restapi

在使用Microsoft Graph时,我无法设置IsOrganizerOptional参数。此代码有效:

{
"timeConstraint": {
"timeslots": [
  {
    "start": {
      "dateTime": "2018-01-11T10:00:00",
      "timeZone": "Pacific Standard Time"
    },
    "end": {
      "dateTime": "2018-01-11T11:00:00",
      "timeZone": "Pacific Standard Time"
    }
  }
]...}

但是,这段代码:

{
"isOrganizerOptional": true,
"timeConstraint": {
"timeslots": [
  {
    "start": {
      "dateTime": "2018-01-11T10:00:00",
      "timeZone": "Pacific Standard Time"
    },
    "end": {
      "dateTime": "2018-01-11T11:00:00",
      "timeZone": "Pacific Standard Time"
    }
  }
]...}

...抛出以下错误:

{
"error": {
    "code": "ErrorInternalServerError",
    "message": "Invalid value for arg:AttendeeConstraints, value:Microsoft.Exchange.Entities.DataModel.MeetingIntelligence.AttendeeConstraints\r\nParameter name: AttendeeConstraints",
    "innerError": {
        "request-id": "4dfbc6ec-cc13-4216-8760-fa2171a98370",
        "date": "2018-01-11T00:27:31"
    }
}}

如何放置isOrganizerOptional参数,使其有效?

1 个答案:

答案 0 :(得分:1)

在没有任何与会者的情况下搜索会议时间时,管理器不能是可选的。虽然错误措辞奇怪,但Invalid value for arg:AttendeeConstraints告诉您,如果isOrganizerOptional为真,与会者为null,则无法找到时间。