Garethp / php-ews

PHP Exchange Web Services
BSD 3-Clause "New" or "Revised" License
112 stars 45 forks source link

getLegacyFreeBusyStatus() does not return WorkingElsewhere #260

Open feldmarv opened 7 months ago

feldmarv commented 7 months ago

Hey there

We currently face the issue that our Exchange EWS API that is connected via PHP does not return the event status WorkingElsewhere.

Referring to the documentation of Microsoft about LegacyFreeBusyStatus. The following status should be supported: Busy, Free, NoData, OOF, Tentative, WorkingElsewhere (https://learn.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.legacyfreebusystatus?view=exchange-ews-api&viewFallbackFrom=exchange-ews-api%5D%3B)

Now it looks like there is only the data Free, Tentative, Busy, OOF, no data is coming form the URL which would refer to this documentation: https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/mergedfreebusy.

Is there some misconfiguration on the Exchange EWS server or is this a limitation of the plugin?

thanks in advance and best regards Marvin

feldmarv commented 7 months ago

We have been able to fix this issue by setting the correct $options Parameter. Per default we have been setting the Parameter to Exchange2010, that meant the Exchange Server does answer in Exchange2010 format, even though its is running on Exchange Version 2016 CU23.

When we are setting the correct $options['version'] = Exchange2016 in our request then response is correct with the latest status feature.

  self::$api = API::withUsernameAndPassword($server, $username, $password, [
                            'version' => $version,
                            'impersonation' => $options['impersonation'],
                            'httpPlayback' => $httpPlaybackOptions
                        ]);