Skip to content

object return instead of array when call getMeetingTimeSuggestions under MeetingTimeSuggestionResult #557

@jp-Telus

Description

@jp-Telus

I called the FindMeetingTime API ( /me/findMeetingTimes ) and got the list of suggestion result returned,

Here is the code:

    $findMeetingEventsUrl = '/me/findMeetingTimes';
    $results = $graph->createRequest('POST', $findMeetingEventsUrl)
        ->addHeaders(['Prefer'=> 'outlook.timezone="Pacific Standard Time"'])
        ->attachBody($newEvent)
        ->setReturnType(Model\MeetingTimeSuggestionsResult::class)
        ->execute();

When I call the getMeetingTimeSuggestions, I only get get an 'object' ("MeetingTimeSuggtesions") instead of array of "MeetingTimeSuggtesions". I expect to get the collections from this call. Do I miss something? Thank you.

   Error
   Cannot use object of type Microsoft\Graph\Model\MeetingTimeSuggestion as array

Source: https://github.com/microsoftgraph/msgraph-sdk-php/blob/dev/src/Model/MeetingTimeSuggestionsResult.php

AB#10302

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions