FindMeetingTimes API not returning expected output

2019-02-15 23:40发布

问题:

I am using the FindMeetingTimes API of Microsoft Graph Library. I am sending the request

{  
   "attendees":[  
      {  
         "emailAddress":{  
            "address":"aparna@meetingassistant.onmicrosoft.com",
            "name":"Aparna Banerjee"
         },
         "type":"Required"
      },
      {  
         "emailAddress":{  
            "address":"pallavi01@meetingassistant.onmicrosoft.com",
            "name":"Pallavi Chowdhery"
         },
         "type":"Required"
      }
   ],
   "timeConstraint":{  
      "timeslots":[  
         {  
            "start":{  
               "dateTime":"2017-10-12T18:00:00",
               "timeZone":"India Standard Time"
            },
            "end":{  
               "dateTime":"2017-10-12T19:00:00",
               "timeZone":"India Standard Time"
            }
         }
      ],
      "activityDomain":"work"
   },
   "locationConstraint":{  
      "isRequired":true,
      "suggestLocation":false,
      "locations":[  
         {  
            "displayName":"Room 101",
            "locationEmailAddress":"Meetingroom101@meetingassistant.onmicrosoft.com",
            "resolveAvailability":"true"
         },
         {  
            "displayName":"Room 303",
            "locationEmailAddress":"meetingroom303@meetingassistant.onmicrosoft.com",
            "resolveAvailability":"true"
         },
         {  
            "displayName":"Room 402",
            "locationEmailAddress":"meetingroom402@meetingassistant.onmicrosoft.com",
            "resolveAvailability":"true"
         },
         {  
            "displayName":"Room 007",
            "locationEmailAddress":"meetingroom007@meetingassistant.onmicrosoft.com",
            "resolveAvailability":"true"
         }
      ]
   },
   "meetingDuration":"PT30M",
   "returnSuggestionReasons":"true",
   "minimumAttendeePercentage":"100"
}

My problem is for the selected Date & Time , The API is giving me response like this

{  
   "@odata.context":"https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.meetingTimeSuggestionsResult",
   "emptySuggestionsReason":"Unknown",
   "meetingTimeSuggestions":[  

   ]
}

and sometimes I also get AttendeesUnavailable. If I go ahead and change the end date to the next day or greater. I get the proper responses.

I want to utilize this API to look out for rooms incase I want to extend my current meeting. Example I have a currently ongoing meeting for another 30 minutes. I want to extend that meeting for some more time

(time would be passed via the parameter). 

I want to look out for the availability of rooms as well as participants.

UPDATE

I changed the parameter  

"activityDomain":"work"

to  

 "activityDomain":"unrestricted"

I checked the Organizer's calendar for the day (screenshot attached). Only one meeting configured for the day

I am trying to get the availability for him . Check the JSON Request below

{  
       "attendees":[  
          {  
             "emailAddress":{  
                "address":"aparna@meetingassistant.onmicrosoft.com",
                "name":"Aparna Banerjee"
             },
             "type":"Required"
          },
          {  
             "emailAddress":{  
                "address":"pallavi01@meetingassistant.onmicrosoft.com",
                "name":"Pallavi Chowdhery"
             },
             "type":"Required"
          }
       ],
       "timeConstraint":{  
          "timeslots":[  
             {  
                "start":{  
                   "dateTime":"2017-10-12T16:32:00",
                   "timeZone":"India Standard Time"
                },
                "end":{  
                   "dateTime":"2017-10-12T17:06:00",
                   "timeZone":"India Standard Time"
                }
             }
          ],
          "activityDomain":"unrestricted"
       },
       "locationConstraint":{  
          "isRequired":true,
          "suggestLocation":false,
          "locations":[  
             {  
                "displayName":"Room 101",
                "locationEmailAddress":"Meetingroom101@meetingassistant.onmicrosoft.com",
                "resolveAvailability":"true"
             },
             {  
                "displayName":"Room 303",
                "locationEmailAddress":"meetingroom303@meetingassistant.onmicrosoft.com",
                "resolveAvailability":"true"
             },
             {  
                "displayName":"Room 402",
                "locationEmailAddress":"meetingroom402@meetingassistant.onmicrosoft.com",
                "resolveAvailability":"true"
             },
             {  
                "displayName":"Room 007",
                "locationEmailAddress":"meetingroom007@meetingassistant.onmicrosoft.com",
                "resolveAvailability":"true"
             }
          ]
       },
       "meetingDuration":"PT30M",
       "returnSuggestionReasons":"true",
       "minimumAttendeePercentage":"100"
    }

The response I got was

{
   "@odata.context":"https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.meetingTimeSuggestionsResult",
   "emptySuggestionsReason":"OrganizerUnavailable",
   "meetingTimeSuggestions":[

   ]
}

I want to know why its showing a problem in the getting the suggestions ? Provided The Organizer doesn't have any meetings for the day.