Send Exchange Mail Message: The request failed. The remote server returned an error: (401) Unauthorized

Hi all,

I am facing an issue with send exchange email, where i get this error: Send Exchange Mail Message: The request failed. The remote server returned an error: (401) Unauthorized.

The twist is that this seems to be happening completely randomly. Sometimes it works, sometimes it doesnt. I use the same activity without changing anything for some time now, and still cannot tell why this is happening. I have checked my credentials a thousand times, besides all the remaining input, which has always been the same.
image
image
Would you be so kind to help me with this issue?

Thanks a lot!

Duarte

@dcandido

If this is happening random, then can you check the event viewer logs and collect the logs when the error message popup

Some services are got issue, due to that it will throwing the error

Hope this helps you

Thanks

Hi @ksrinu070184, thanks for your reply.

I get this in the event viewer logs:

RemoteException wrapping Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote server returned an error: (401) Unauthorized. —> RemoteException wrapping 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() in \REDMOND\EXCHANGE\BUILD\E15\15.00.0913.015\SOURCES\sources\dev\EwsManagedApi\src\EwsManagedApi\Core\EwsHttpWebRequest.cs:line 113
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request) in \REDMOND\EXCHANGE\BUILD\E15\15.00.0913.015\SOURCES\sources\dev\EwsManagedApi\src\EwsManagedApi\Core\Requests\ServiceRequestBase.cs:line 821
— End of inner exception stack trace —
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager).

Unfortunately i cannot understand the error from here, is it something you might be able to help with?

Thank you!

@dcandido

Can you check with the Exchange admin also, is this happening from there side?

As it is saying Unauthorized, so i suggest to check with them, hope they have something

Also you can check as below for your reference

Thanks

hi @ksrinu070184, I have contacted my admin and he also can not figure out. I tried running the workflow on another colleague’s laptop and it works, just not on mine. I did the connectivity test and it failed, but tried it with my colleague who manages to run the robot fine and the test failed too, so I am not sure it is coming from there.

Do you have any other idea of what it might be?

Thank you for the help!

Duarte