Martin Sommer
Martin Sommer

Reputation: 566

Unable to set isOrganizerOptional parameter, in findMeetingTimes

In using Microsoft Graph, I am unable to set the IsOrganizerOptional parameter. This code works:

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

But, this code:

{
"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"
    }
  }
]...}

... throws the following error:

{
"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"
    }
}}

How do I place the isOrganizerOptional parameter, to make it work?

Upvotes: 1

Views: 627

Answers (1)

Marc LaFleur
Marc LaFleur

Reputation: 33124

When searching for a meeting time without any Attendees, the Organizer cannot be optional. While the error is oddly worded, Invalid value for arg:AttendeeConstraints is telling you it cannot find a time when isOrganizerOptional is true and Attendees is null.

Upvotes: 1

Related Questions