Get Outlook Mail Messages Auth Issue


I am quite new to RPA/UiPath so please excuse any silly questions - I’ve inherited a few robots to maintain and build features onto so I’m still very much a “rookie”.

For reference I am running Studio Version: v2018.2.4 and Orchestrator Version: v2016.2.6232

Over the past week one of our robots has been (likely) broken due to a backend change with Microsoft accounts. Initially it seemed as if the licensing was expired. I have verified the licensing is working, and I can login as well as send/receive emails on the host machine the robot runs on.

When GetOutlookMailMessages is called the below error is thrown.

Message: AuthenticationInvalidCredentials: 5.7.3 Authentication unsuccessful [BN6PR16CA0022...

Exception Type: AuthenticationException

MailKit.Security.AuthenticationException: AuthenticationInvalidCredentials: 5.7.3 Authentication unsuccessful [BN6PR16CA0022…
at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

I’m just trying to figure out why/how it actually auths to get messages and why it might not be working. If it simply opens an instance of outlook (which it seems to do in the system tray). Any suggestions are appreciated.

Might be password change is not effected in Security credntial. Can you retype your credential and try again ?

I’ve already tried that many times - the issue is that I can’t seem to see how/where the auth/credentials are setup for when calling: GetOutlookMailMessages().

I’ve only defined a mailbox path as well as the email tied to the outlook (that I can send and receive from). I’m at a loss here


I guess the problem is with the outlook password.
Open outlook application manually and check if outlook is connected to Microsoft Exchange successfully. The status should be as shown below -

If not fix the outlook issue.
For example: If the status bar shows “Require password”. Enter password.

Karthik Byggari

Thanks for the suggestion!

After speaking with support a few times it turned out to be a dependency issue with MailKit/MimeKit. Simply removing MailKit from solved this very odd issue.

If it happens in the future I’ll just remove the folder from %localappdata%/UiPath/Activities

Hopefully this helps someone in the future!

Such a time sink…