OfficeDev / ews-java-api

A java client library to access Exchange web services. The API works against Office 365 Exchange Online as well as on premises Exchange.
MIT License
867 stars 557 forks source link

Exchange Service Return (503)Service Unavailable #753

Open veir-panda opened 2 years ago

veir-panda commented 2 years ago

As mentioned in the title, Exchange Service is not available and return "(503)Service Unavailable". Which URL is https://outlook.office365.com/EWS/Exchange.asmx . Is anyone in this situcation?

wureka commented 2 years ago

One possible cause could be that the exchange server you want to connect will validate the user agent. So you must find some valid user agent and try again. By the way, you may need to build your own ews-java-api.jar by deleting the default user agent in ExchangeServiceBase.defaultUserAgent. Otherwise even you set a valid user agent, you may still not pass the validation from the exchange server. Look forward to your test result.