401 Unauthorized on O365 connector

The Exchange service EEAttachments can save your attachments or mails automatically to your file-system and process it by your own scripts.
Post Reply
Posts: 10
Joined: Tue Aug 18, 2020 12:54 pm

401 Unauthorized on O365 connector

Post by Greenman »

Sorry to bother you again, I get a 401 Unauthorized error when using the O365 connector. At first I'm able to logon and it will download my attachments perfectly. But then, after (random) 15- 60 minutes I get the error below. When I stop the service and do a fresh restart everything works fine again (for 15-60 minutes). Please let me know if you need any more logging. I have enabled the option Trust each Certificate.

20210202 11:24:09 SRVC 6 ExportJob:PFor:Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote server returned an error: (401) Unauthorized. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
--- End of inner exception stack trace ---
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
at Microsoft.Exchange.WebServices.Data.ExchangeService.SyncFolderItems(FolderId syncFolderId, PropertySet propertySet, IEnumerable`1 ignoredItemIds, Int32 maxChangesReturned, SyncFolderItemsScope syncScope, String syncState)
at EEAttachments.ExportJob.<>c__DisplayClass243_0.xnOKqBoI5H()
at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
at EEAttachments.ExportJob.DLJ6k42YgR(ExchangeService )
at EEAttachments.ExportJob.<>c__DisplayClass237_0.FWbZBS63eU()
at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
at EEAttachments.ExportJob.eNW6vVj67d(ExchangeService )
at EEAttachments.EEAttService.YaQcWZ3H5u32N6HLWuK(Object , Object )
at EEAttachments.EEAttService.S4HyQO0VR(Object )
User avatar
Site Admin
Posts: 1519
Joined: Sun Jan 06, 2008 9:54 pm

Re: 401 Unauthorized on O365 connector

Post by Sven »

I know of this problem already and I just uploaded a new version, which should solve it.
Post Reply