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 @Srini84, 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 @Srini84, 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

is there any solution for this?Kindly help me. I’m also getting the same isuue.

1 Like

I am facing the same issue since the last two weeks when I try to send the mail using the account within my organization through send exchange mail message activity it shows the 401 unauthorized error [Send Exchange Mail Message: The request failed. The remote server returned an error: (401) Unauthorized].

So, I tried to send the mail by using another organization accounts through send exchange mail message activity it works but after one weak the 401 unauthorized error show for this organization too.

We have configured many processes using the accounts in my organization to send a report. So, it’s more critical issue for us.

We are still looking for the solution to solve 401 unauthorized issues So if anyone knows the solution or any suggestions to solve the issue please share.

Maybe it is caused by discontinuation of EXO basic authentication.
There is no solution with “Send Exchange mail message” so you can try “Send SMTP mail message” instead.

Hopefully you make it worked.

Thansk for your help

Hi, there is solution for exchange here.