web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Retrieve Email message...
Power Automate
Unanswered

Retrieve Email messages Authentication Failing

(0) ShareShare
ReportReport
Posted on by 41

Good Day, Thank you for your interest. 

 

While trying to authenticate to outlook; the password is not saving properly. I tried both methods of Direct Input and Set Variable. After saving and reopening the Flow step, the password is automatically reduced to 5-digit password which is not correct. When I save it, my password is 12 characters long. 


Pasted below are also the full error details. Any help would be appreciated.

 

Best,

Sunny

 

Automate Desktop - Retrieve Email Messages.jpg

 

Authentication failed on IMAP server outlook.office365.com.

 

Microsoft.Flow.RPA.Desktop.Robin.SDK.ActionException: Authentication failed on IMAP server outlook.office365.com. ---> MailKit.Security.AuthenticationException: LOGIN failed.
at MailKit.Net.Imap.ImapClient.<AuthenticateAsync>d__83.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MailKit.Net.Imap.ImapClient.Authenticate(Encoding encoding, ICredentials credentials, CancellationToken cancellationToken)
at MailKit.MailService.Authenticate(Encoding encoding, String userName, String password, CancellationToken cancellationToken)
at Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.EmailActions.RetrieveEmails(Variant imapServer, Variant username, Variant varPassword, Variant mailFolder, Variant fromContains, Variant toContains, Variant subjectContains, Variant bodyContains, Variant sentSince, Variant sentUpTo, Variant saveAttachmentsInto, Variant& retrievedEmails, Int32 serverPort, Boolean enableSsl, Int32 retrieveOnlyUnread, Boolean saveAttachments, Boolean markAsRead, Boolean acceptUntrustedCertificates)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.RetrieveEmails.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

  • mattias1172 Profile Picture
    on at

    Does the account you are logged in as have access to the mailbox? Or are you trying to access a different Outlook account? 

     

    Have you tried it without the ssl option selected? 

     

    As for the 5 digits, that's likely just being displayed as 5 digits. The actual length of the password may be hidden. 

     

     

  • Guriga Profile Picture
    188 on at

    Hi,

    is the IMAP enabled on this mailbox?

  • Michelle___ Profile Picture
    2 on at

    I encountered the same issue. Did you find the answer to this? If so, please share here. Thanks. 

  • wezhema Profile Picture
    31 on at

    Hey, I faced the same issue recently, I had some processes that were working before but suddenly started failing, it seems like MS disabled Basic Auth for IMAP around Oct 1st 2022 (Not sure about your case since it is older but for anyone looking for a quick solution like me, I found this), I re-enabled the Basic Auth by following this article: Basic Authentication and Exchange Online – September 2021 Update - Microsoft Community Hub

    Hopefully it helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 211 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 190

Last 30 days Overall leaderboard