You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 18, 2024. It is now read-only.
I have client application using cloud based Office 365. After upgrade to the ews-java-api 2.0 from previously used Microsoft's EWSJavaAPI 1.2 library, autodiscover stopped working correctly.
After analysing logs I found that in the autodiscover process the previous EWS library was making a GET request to autodiscover service :
The response for POST to POST /autodiscover/autodiscover.xml is also HTTP 200 OK, however the response is missing the X-SOAP-Enabled: True and X-WSSecurity-Enabled: True headers.
Because of that, the ews-java-api assumes only Legacy endpoint is enabled
and reports error: microsoft.exchange.webservices.data.autodiscover.exception.AutodiscoverLocalException: The Autodiscover service couldn't be located.
When changed the code to use GET instead of POST in AutodiscoverService.tryGetEnabledEndpointsForHost() , things started to work correctly
note also that AutodiscoverService.java:1522 has request.setRequestMethod("GET");
however HttpClientWebRequest.java:102 is always using POST request httpPost = new HttpPost(getUrl().toString());