Accessing other mailbox calendar events with PHP-EWS

In PHP-EWS library ( https://github.com/jamesiarmes/php-ews ) I can access specific user's calendar events using this code: https://github.com/jamesiarmes/php-ews/wiki/ Calendar: -Get-List- (Retrieving-Id-and-ChangeKey) In all library functions, we always use single user authentication:

$ews = new ExchangeWebServices($host, $username, $password, $version);

      

How can I get calendar events from another user's mailbox? If I have an LDAP account with administrator privileges, is it possible to access calendar events from another user's mailbox using the PHP-EWS library? Or is there only mailbox access available for the user account credentials used in authentication?

$ews = new ExchangeWebServices($host, $username, $password, $version);

      

Does anyone have an example of accessing calendar events from another user's mailbox using the PHP-EWS library with an LDAP administrator account?

Thank.

+2


source to share


1 answer


In the code block under "Watch Only" in the Calendars folder, add this to fetch events from the mail@address.com mailing list :



$request->ParentFolderIds->DistinguishedFolderId->Mailbox = new StdClass;
$request->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress = 'email@address.com';

      

+2


source







All Articles