Hi ,I am trying to read emails using this ews-java-api every 5 mins using a batch process and it completes in 1 min max as we just read first 10 emails. In a day we can see average 3 to 5 times intermittent error "The request failed. The request failed. The remote server returned an error: (401)Unauthorized".
It occurs when we call below highlighted line:
Mailbox mb = new Mailbox(emailAddress);
FolderId folder = new FolderId(WellKnownFolderName.Inbox, mb);
FindItemsResults result = service.findItems(folder, view);
Hi ,I am trying to read emails using this ews-java-api every 5 mins using a batch process and it completes in 1 min max as we just read first 10 emails. In a day we can see average 3 to 5 times intermittent error "The request failed. The request failed. The remote server returned an error: (401)Unauthorized".
It occurs when we call below highlighted line: Mailbox mb = new Mailbox(emailAddress); FolderId folder = new FolderId(WellKnownFolderName.Inbox, mb); FindItemsResults- result = service.findItems(folder, view);