Issue:
Intermittently, user facing "Caused by: microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. The request failed. The remote server returned an error: (401)" error while executing the EWS API call (Say, while deleting an email) during Mail fetching.
Reason for this could be expiry of the access token. While starting the mail fetching schedule using EWS, a new ExchangeService object will be created with access token. This access token is used for every EWS API call and it has an expiry of 1hour by default.
If the schedule is running for more than an hour, this access token expires and subsequent EWS API call is thrown with (401) error.
Fix:
Workaround has been prepared to check the expiry of access token before every EWS API call and renew it if it expires. This way, we can avoid the (401) error.
Steps to apply the workaround:
1. Download the attached 14006_8723450.fjar file.
3. Restart the application service.
4. Monitor for the issue.
5. If the issue occurs, immediately zip the logs (<server_home>\logs folder. For eg: C:\Program Files\ManageEngine\ServiceDesk\logs folder) and share it with us for analysis. If the size of the log file is huge, you can send it to us using our FTP link
https://bonitas2.zohocorp.com/. Select the product as "ServiceDesk Plus" and ticket number as 8411003.
Jar compatibility
Build | FileName |
14006 | 14006_8723450.fjar |