Forum Discussion
lucaskvmt
May 16, 2023Copper Contributor
My request to fetch all findMeetingTimes is only limited to 5 times using the graph library
I'm developer a request to get all available times through /me/findMeetingTimes using microsoft graph
public function calendar(Request $request)
{
if($request->dia == ''){
$dia = date('Y-m-d');
}else{
$dia = $request->dia;
}
$viewData = $this->loadViewData();
$graph = $this->getGraph();
$bodyjson = '{
"attendees": [
{
"emailAddress": {
"address": "'.$request->sala.'",
"name": "'.$request->sala.'"
},
"type": "Required"
}
],
"timeConstraint": {
"activityDomain": "unrestricted",
"timeslots": [
{
"start": {
"dateTime": "'.$dia.'T08:00:00",
"timeZone": "'.$viewData['userTimeZone'].'",
},
"end": {
"dateTime": "'.$dia.'T19:00:00",
"timeZone": "'.$viewData['userTimeZone'].'",
}
}
]
},
"locationConstraint": {
"isRequired": "false",
"suggestLocation": "false",
"locations": [
{
"displayName": "Conf Room 32/1368",
"locationEmailAddress": "email address removed for privacy reasons"
}
]
},
"meetingDuration": "PT1H",
"minimumAttendeePercentage": 100
}';
$getEventsUrl = 'http://222.178.203.72:19005/whst/63/=sdbgbnlltmhsxzlhbqnrneszbnl//me/findMeetingTimes';
$events = $graph->createRequest('POST', $getEventsUrl)->attachBody($bodyjson)
// Add the user's timezone to the Prefer header
->addHeaders(array(
'Prefer' => 'outlook.timezone="'.$viewData['userTimeZone'].'"'
))
->setReturnType(Model\Event::class)
->execute();
dd($events);
}
You can see that there is no limiter that sets a return of only 5 times, but still it return to me like this
"meetingTimeSuggestions" => array:5 [â–¼
0 => array:5 [â–¼
"confidence" => 100.0
"organizerAvailability" => "free"
"attendeeAvailability" => array:1 [â–¶]
"locations" => []
"meetingTimeSlot" => array:2 [â–¼
"start" => array:2 [â–¼
"dateTime" => "2023-05-17T08:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
"end" => array:2 [â–¼
"dateTime" => "2023-05-17T09:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
]
]
1 => array:5 [â–¼
"confidence" => 100.0
"organizerAvailability" => "free"
"attendeeAvailability" => array:1 [â–¶]
"locations" => []
"meetingTimeSlot" => array:2 [â–¼
"start" => array:2 [â–¼
"dateTime" => "2023-05-17T09:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
"end" => array:2 [â–¼
"dateTime" => "2023-05-17T10:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
]
]
2 => array:5 [â–¼
"confidence" => 100.0
"organizerAvailability" => "free"
"attendeeAvailability" => array:1 [â–¶]
"locations" => []
"meetingTimeSlot" => array:2 [â–¼
"start" => array:2 [â–¼
"dateTime" => "2023-05-17T10:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
"end" => array:2 [â–¼
"dateTime" => "2023-05-17T11:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
]
]
3 => array:5 [â–¼
"confidence" => 100.0
"organizerAvailability" => "free"
"attendeeAvailability" => array:1 [â–¶]
"locations" => []
"meetingTimeSlot" => array:2 [â–¼
"start" => array:2 [â–¼
"dateTime" => "2023-05-17T11:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
"end" => array:2 [â–¼
"dateTime" => "2023-05-17T12:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
]
]
4 => array:5 [â–¼
"confidence" => 100.0
"organizerAvailability" => "free"
"attendeeAvailability" => array:1 [â–¶]
"locations" => []
"meetingTimeSlot" => array:2 [â–¼
"start" => array:2 [â–¼
"dateTime" => "2023-05-17T12:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
"end" => array:2 [â–¼
"dateTime" => "2023-05-17T13:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
]
]
]
]
In the microsoft account of the "emailAddress" a time slot between 8:00 am and 5:00 pm was defined
If I register a meeting at the last return time (12h00 to 13h00), in the next request it returns me
the next time not shown before (13:00 to 14:00)
"meetingTimeSuggestions" => array:5 [â–¼
0 => array:5 [â–¼
"confidence" => 100.0
"organizerAvailability" => "free"
"attendeeAvailability" => array:1 [â–¶]
"locations" => []
"meetingTimeSlot" => array:2 [â–¼
"start" => array:2 [â–¼
"dateTime" => "2023-05-17T08:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
"end" => array:2 [â–¼
"dateTime" => "2023-05-17T09:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
]
]
1 => array:5 [â–¼
"confidence" => 100.0
"organizerAvailability" => "free"
"attendeeAvailability" => array:1 [â–¶]
"locations" => []
"meetingTimeSlot" => array:2 [â–¼
"start" => array:2 [â–¼
"dateTime" => "2023-05-17T09:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
"end" => array:2 [â–¼
"dateTime" => "2023-05-17T10:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
]
]
2 => array:5 [â–¼
"confidence" => 100.0
"organizerAvailability" => "free"
"attendeeAvailability" => array:1 [â–¶]
"locations" => []
"meetingTimeSlot" => array:2 [â–¼
"start" => array:2 [â–¼
"dateTime" => "2023-05-17T10:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
"end" => array:2 [â–¼
"dateTime" => "2023-05-17T11:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
]
]
3 => array:5 [â–¼
"confidence" => 100.0
"organizerAvailability" => "free"
"attendeeAvailability" => array:1 [â–¶]
"locations" => []
"meetingTimeSlot" => array:2 [â–¼
"start" => array:2 [â–¼
"dateTime" => "2023-05-17T11:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
"end" => array:2 [â–¼
"dateTime" => "2023-05-17T12:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
]
]
4 => array:5 [â–¼
"confidence" => 100.0
"organizerAvailability" => "free"
"attendeeAvailability" => array:1 [â–¶]
"locations" => []
"meetingTimeSlot" => array:2 [â–¼
"start" => array:2 [â–¼
"dateTime" => "2023-05-17T13:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
"end" => array:2 [â–¼
"dateTime" => "2023-05-17T14:00:00.0000000"
"timeZone" => "E. South America Standard Time"
]
]
]
]
]
Is there any limiter that does not allow the return to have more than 5 times, any suggestions of what this could be?
No RepliesBe the first to reply