php-ews icon indicating copy to clipboard operation
php-ews copied to clipboard

getLegacyFreeBusyStatus() does not return WorkingElsewhere

Open feldmarv opened this issue 2 years ago • 1 comments

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 avatar Jan 18 '24 14:01 feldmarv

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
                        ]);

feldmarv avatar Jan 24 '24 07:01 feldmarv