Microsoft graph api 具有时间约束的FindMeetingTimes返回ErrorInternalServerError

Microsoft graph api 具有时间约束的FindMeetingTimes返回ErrorInternalServerError,microsoft-graph-api,outlook-restapi,Microsoft Graph Api,Outlook Restapi,使用Graph API,我提出了一个类似于下面的请求 出于某种原因,当我包含TimeConstraint时,我会得到一个空指针。如果我没有包含TimeConstraint节点,请求将成功返回 对我来说,我的TimeConstraint部分看起来不错。有什么不对劲或我遗漏了什么吗 例外情况: { "error": { "code": "ErrorInternalServerError", "message": "Object reference not set to an in

使用Graph API,我提出了一个类似于下面的请求

出于某种原因,当我包含
TimeConstraint
时,我会得到一个空指针。如果我没有包含
TimeConstraint
节点,请求将成功返回

对我来说,我的
TimeConstraint
部分看起来不错。有什么不对劲或我遗漏了什么吗

例外情况:

{
  "error": {
    "code": "ErrorInternalServerError",
    "message": "Object reference not set to an instance of an object.",
    "innerError": {
      "request-id": "905b8b0f-5de2-4559-861d-4244aa25da7c",
      "date": "2017-11-21T13:48:32"
    }
  }
}
请求:

{
   "Attendees":[
      {
         "type":"required",
         "emailAddress":{
            "address":"user1@tenant.com"
         }
      },
      {
         "type":"required",
         "emailAddress":{
            "address":"user2@tenant.com"
         }
      },
      {
         "type":"required",
         "emailAddress":{
            "address":"user3@tenant.com"
         }
      }
   ],
   "LocationConstraint":{
      "locations":[
         {
            "resolveAvailability":true,
            "locationEmailAddress":"room@tenant.com"
         }
      ]
   },
   "TimeConstraint":{
      "activityDomain":"work",
      "timeslots":[
         {
            "start":{
               "dateTime":"2017-11-26T09:00:00",
               "timeZone":"Pacific Standard Time"
            }
         },
         {
            "end":{
               "dateTime":"2017-11-26T17:00:00",
               "timeZone":"Pacific Standard Time"
            }
         }
      ]
   },
   "MeetingDuration":"PT1H",
   "MaxCandidates":99,
   "IsOrganizerOptional":false,
   "ReturnSuggestionReasons":true,
   "MinimumAttendeePercentage":100.0
}

“开始<代码>和结束`属性的作用域太远了一级。”。这些是同一对象的属性:

请尝试以下方法:

“时隙”:[{
“开始”:{
“日期时间”:“2017-11-23T16:58:07.973Z”,
“时区”:“东部标准时间”
},
“结束”:{
“日期时间”:“2017-11-30T16:58:07.973Z”,
“时区”:“东部标准时间”
}
}]
使用Microsoft Graph.NET客户端SDK时:

//创建时间约束
TimeConstraint TimeConstraint=新的TimeConstraint();
timeConstraint.ActivityDomain=ActivityDomain.Unrestricted;
//创建一个时隙
时隙时隙=新时隙();
timeSlot.Start.DateTime=“2017-11-23T16:58:07.973Z”;
timeSlot.Start.TimeZone=“东部标准时间”;
timeSlot.End.DateTime=“2017-11-30T16:58:07.973Z”;
timeSlot.End.TimeZone=“东部标准时间”;
//创建时间段集合并添加时间段
列表时隙=新列表();
时间段。添加(时间段);
//将时间段集合分配给TimeControint
时间限制。时间段=时间段;

感谢您的回复。我已经更新了(我的任何问题)以包含activityDomain,但仍然收到一个空指针。还有什么想法吗?我找到了它并更新了我的答案。您有一个额外的对象,它封装了
开始
结束
开始和
结束
是相同
时隙
的属性,而不是分开的
时隙
对象。我将用一个例子更新我的答案。有意义!谢谢你更新的答案。。。现在工作!可怕的错误消息:)