.Get Exchange Mail activity showing error

I am facing an error while using Get Exchange mail activity.

**Get Exchange Mail Messages: The request failed. The remote server returned an error: (401) **
I am unable to forward mail which contain table formatted data in its body. even if I used htmlbody true option tick.
then I used Get Exchange Mail Message but faced new Error given above

Please help, My main concern is to forward mail as it is with table formatted data to recipient
I tried all suggestion provided in Uipath Forum, but none of them work
our exchange server is 2016…
Harish Sharma.


Can you check, can you able to send a simple message from this activity with the given credentials?

Let me know


Thanks for suggestion it was good idea but not work yes having same error see screen shot, one more thing to ask should i use email id as user name or account id like user id.
our domain is “apac” I used user id as apac????
can you tell what exactly should i use domain
only apac or apac.global.sgs.com as my company name is sgs

see screen shot

Hi @harishkr.netsoft

Could you maybe specify:

  • your Studio version
  • your Mail package version
  • sample of the email in question (a screenshot, or a saved sample email)

This would help in figuring out the issue.

You might also try updating the Mail package to the latest preview version, just to see if the issue wasn’t tackled already.

Please find answer
Studio Version is Community Edition Studio Pro 2020.4.3
Exchange Server is 2016 and attached with AD server.
Mail package version find screen shot below

sample of email is
i receive mail which contain Table in body part , i want to forward this same mail to my external client whose email id is not within our domain or you can say recipient is gmail id.
like below screen
please help. if use send outlook activity it don’t work even i tick ishtml or untick in both case not work
then i use send exchange mail activity but it is also not working.
showing me error
i know my credential are correct
Thanks in Advance

Hi @harishkr.netsoft

Our team had a look, and it looks like you should discuss with your admin what the correct authentication setup for your particular Exchange server is.

The activity was tested and works well with properly setup server.

Some hints here:
The issue might be with the authentication method. When trying to authenticate using the “old” method (i.e. specifying server, domain, user, password, etc), you can get the 401 error. This is because the Exchange server does not allow this authentication type. You must use the modern authentication method (application id and optionally directory id must be specified). Using this method (with authentication type set to interactive), I will get prompted for the account and after that everything should work just fine.


Hi @Maciej

Thanks !
it was resolved two months before and error was due to Less access over exchange server.

1 Like

can you specify more about the issue as i am facing the same issue , thanks in advance :slight_smile:


I am facing the similar issue of connecting to mailbox using exchange server in UiPath. I have provided correct credentials and also upgraded latest version(UiPath.Mail.Activities v1.12.2)but facing error - The remote server returned an error 401 unauthorized.

Again the same exchange server details are working for my colleague credentials.

Can any one pls help me out to sort this issue.



Hello, did you get any solution for this? I’m facing the same issue…

Hi @harishkr.netsoft , May I know how the issue resolved when there is less access. what are the actions taken. Please let me know.

Hi ,
Will the prompt be one time or it will be everytime we use the exchange server activity?