1

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?

Martin Sommer
  • 536
  • 5
  • 14
  • This turns out to be a MS API bug. Ref: https://stackoverflow.com/questions/48214744/bug-findmeetingtimes-thows-organizerunavailable-on-15-minute-start-times – Martin Sommer Jan 12 '18 at 17:14

1 Answers1

1

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.

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
  • Thanks Marc, the root issue I am trying to solve, is that I am getting a "emptySuggestionsReason = OrganizerUnavailable" for certain times of the day. Do I need to add the Organizer as an Attendee, and then make them optional? If so, how would that look in code? The Attendee docs, state "An empty collection causes findMeetingTimes to look for free time slots for only the organizer". Can you please help me out here? – Martin Sommer Jan 11 '18 at 05:18
  • Are you getting `OrganizerUnavailable` for times where they are in fact available? – Marc LaFleur Jan 11 '18 at 14:00
  • Correct. I have the organizer's Office 365 Calendar open in another tab, and the organizer and requested rooms are completely available. This behavior is somewhat sporadic, where I get zero rooms and the OrganizerUnavailable message, after a few other tests. – Martin Sommer Jan 11 '18 at 15:05
  • Marc, I have an update: If I request room starting on the :15 or :45 minute time of an hour (for example, 3:15, 3:45, etc), I will continuously get the "emptySuggestionsReason = OrganizerUnavailable" error, regardless if the room is available or not. Is findMeetingTimes limited to half hour starting points, such as 3:00, 3:30, etc? It is not, in Office 365. – Martin Sommer Jan 11 '18 at 19:15
  • Interesting, I believe this is a bug and likely the reason behind this question as well: https://stackoverflow.com/questions/46703193/findmeetingtimes-api-not-returning-expected-output-for-the-same-date – Marc LaFleur Jan 11 '18 at 19:34
  • Yeah, I just posted a new item: https://stackoverflow.com/questions/48214744/findmeetingtimes-thows-organizerunavailable-on-15-minute-start-times Can we please get this fixed? – Martin Sommer Jan 11 '18 at 19:46