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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Authentication failure...
Power Automate
Unanswered

Authentication failures on the IMAP server imap.gmail.com

(0) ShareShare
ReportReport
Posted on by 5

Hi, 

I have an action in PAD and I have Error message :

Does anyone already have this problem?
Thanks

Authentication failures on the IMAP server imap.gmail.com
Location: Subflow: Main, Line: 3, Action Name: Retrieve Email Messages

Correlation ID : 7a8e83fc-6475-4e53-bb4c-ae9aa4873fb3

Invalid credentials (Failure): Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Échec de l’authentification sur le serveur
IMAP imap.gmail.com. ---> MailKit.Security.AuthenticationException: Invalid credentials (Failure)
à MailKit.Net.Imap.ImapClient.<AuthenticateAsync>d__83.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à MailKit.Net.Imap.ImapClient.Authenticate(Encoding encoding, ICredentials credentials, CancellationToken cancellationToken)
à MailKit.MailService.Authenticate(Encoding encoding, String userName, String password, CancellationToken cancellationToken)
à 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 ---
à Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.RetrieveEmails.Execute(ActionContext context)
à Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

 

 

  Recup messages.jpg

Authentication failures on the IMAP server imap.gmail.com
Location: Subflow: Main, Line: 3, Action Name: Retrieve Email Messages

Correlation ID : 7a8e83fc-6475-4e53-bb4c-ae9aa4873fb3

Invalid credentials (Failure): Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Échec de l’authentification sur le serveur
IMAP imap.gmail.com. ---> MailKit.Security.AuthenticationException: Invalid credentials (Failure)
à MailKit.Net.Imap.ImapClient.<AuthenticateAsync>d__83.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à MailKit.Net.Imap.ImapClient.Authenticate(Encoding encoding, ICredentials credentials, CancellationToken cancellationToken)
à MailKit.MailService.Authenticate(Encoding encoding, String userName, String password, CancellationToken cancellationToken)
à 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 ---
à Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.RetrieveEmails.Execute(ActionContext context)
à Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @jmsymbio 

     

    does basic authenication is retired for your mailbox ?

     

    Also i think there are some settings needed in your flow so that imap can access the email. Enable Less Secure apps to make imap accessible if that option is available for you

    https://support.google.com/accounts/answer/6010255?hl=en

     

     

  • jmsymbio Profile Picture
    5 on at

    thank you very much Nived_Nambiar
    I have to produce a demonstration video so it's too hard for me to keep the date, I'll try again more slowly, for now I'll go through Pabbly connect to connect to Gmail.

  • Sallavudeen Profile Picture
    2 on at
    Hi all,
     
    For Authentication failures on the IMAP server imap.gmail.com
     
    Answering this Question in  2025
    1. Open Gmail in a web browser.

    2. Click the gear icon (⚙️) → See all settings.

    3. Go to the "Forwarding and POP/IMAP" tab., make sure the setting below  is same as in your side                                                                                                 (Note: By default IMAP will be in Enabled State and this option will not appear here and Micorsoft removed Less Secure Apps option as well)

    4.  
    5. Click on Save changes at the end.
     
    6. then on top-right click on icon  followed by click on manage Accounts as same as in below pic
    7. Click on Securtiy on Left side and scroll down to find 2- step Verification option
    8. 
    1. Under "Signing in to Google", enable 2-Step Verification (if not already on).

    2. After enabling, click on this url (App passwords in gmail) to naviagte to App Password Page.

    3. Provide a name (e.g., "Power Automate") in APP Name Textbox and click Create.

    4. On Generate app Password Pop-up, copy that

    5. Use this password (not your Gmail password) in Power Automate Desktop like below. (Note: put your email id and for password  copy and paste the above step one)

    6. This Will works and hope your flow runs successfully. Let me know, if this query resolves and makes your day much better.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard