1
votes

Using php-ews: https://github.com/jamesiarmes/php-ews

I'm able to list events from my own calendar according to this example: https://github.com/jamesiarmes/php-ews/wiki/Calendar:-Get-List-(Retrieving-Id-and-ChangeKey) But after searching for a solution for a few hours I still haven't been able to find a way to access shared calendars.

This question is similar, but has no answer: EWS: Access shared calendars

From looking at that and various other search results (I've googled many variants of "ews shared calendar") I have to find the location of the shared calendar, get the id and then use that. But I haven't been able to do that. Can anyone help?

1
Look into the account permissions for the exchange account you are using. I know that you can use the impersonation route if the account has impersonation privileges.ThomasEllis

1 Answers

1
votes

In the code block under Only look in the "calendars folder" add this in order to retrieve events from [email protected]'s calendar:

$request->ParentFolderIds->DistinguishedFolderId->Mailbox = new StdClass;
$request->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress = '[email protected]';