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 has been archived by the owner on Jun 18, 2024. It is now read-only.
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. An internal server error occurred. The operation failed.
#746
Open
skenkre opened this issue
Jun 17, 2021
· 2 comments
· May be fixed by #768
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. An internal server error occurred. The operation failed.
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:74)
at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:158)
at microsoft.exchange.webservices.data.core.ExchangeService.internalFindFolders(ExchangeService.java:377)
at microsoft.exchange.webservices.data.core.ExchangeService.findFolders(ExchangeService.java:425)
at microsoft.exchange.webservices.data.core.ExchangeService.findFolders(ExchangeService.java:461)
at com.neustar.EWSOffice365Reader.main(EWSOffice365Reader.java:189)
Caused by: microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: An internal server error occurred. The operation failed.
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.processWebException(ServiceRequestBase.java:548)
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.validateAndEmitRequest(ServiceRequestBase.java:641)
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:62)
... 5 more
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
service.setUrl(new URI("https://outlook.office365.com/EWS/Exchange.asmx"));
BearerAccessToken bat = new BearerAccessToken(future.get().accessToken());
TokenCredentials credentials = new TokenCredentials(bat.getValue());
service.setImpersonatedUserId(new ImpersonatedUserId(ConnectingIdType.SmtpAddress , MAILBOX));
service.getHttpHeaders().put("X-AnchorMailbox", MAILBOX);
service.setCredentials(credentials);
service.setTraceEnabled(true);
I get the access token properly but the moment it comes across FindFoldersResults findResults it throws above mentioned exception.
The text was updated successfully, but these errors were encountered:
I get this error using EWS java api :
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. An internal server error occurred. The operation failed.
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:74)
at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:158)
at microsoft.exchange.webservices.data.core.ExchangeService.internalFindFolders(ExchangeService.java:377)
at microsoft.exchange.webservices.data.core.ExchangeService.findFolders(ExchangeService.java:425)
at microsoft.exchange.webservices.data.core.ExchangeService.findFolders(ExchangeService.java:461)
at com.neustar.EWSOffice365Reader.main(EWSOffice365Reader.java:189)
Caused by: microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: An internal server error occurred. The operation failed.
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.processWebException(ServiceRequestBase.java:548)
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.validateAndEmitRequest(ServiceRequestBase.java:641)
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:62)
... 5 more
The error is shown at below mentioned line.
FindFoldersResults findResults = service.findFolders(WellKnownFolderName.Inbox, folderview);
The service code is as below :
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
service.setUrl(new URI("https://outlook.office365.com/EWS/Exchange.asmx"));
BearerAccessToken bat = new BearerAccessToken(future.get().accessToken());
TokenCredentials credentials = new TokenCredentials(bat.getValue());
service.setImpersonatedUserId(new ImpersonatedUserId(ConnectingIdType.SmtpAddress , MAILBOX));
service.getHttpHeaders().put("X-AnchorMailbox", MAILBOX);
service.setCredentials(credentials);
service.setTraceEnabled(true);
I get the access token properly but the moment it comes across FindFoldersResults findResults it throws above mentioned exception.
The text was updated successfully, but these errors were encountered: