Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Power Automate Desktop
Unanswered

Authentication failures on the IMAP server imap.gmail.com

Like (0) ShareShare
ReportReport
Posted on 29 Sep 2023 13:19:19 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)

  • Sallavudeen Profile Picture
    2 on 12 May 2025 at 15:40:10
    Authentication failures on the IMAP server imap.gmail.com
    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.

     
  • jmsymbio Profile Picture
    5 on 29 Sep 2023 at 20:09:57
    Re: Authentication failures on the IMAP server imap.gmail.com

    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.

  • Nived_Nambiar Profile Picture
    17,654 Super User 2025 Season 1 on 29 Sep 2023 at 17:44:11
    Re: Authentication failures on the IMAP server imap.gmail.com

    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

     

     

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 147 Super User 2025 Season 1

#2
Riyaz_riz11 Profile Picture

Riyaz_riz11 56 Super User 2025 Season 1

#3
Nived_Nambiar Profile Picture

Nived_Nambiar 30 Super User 2025 Season 1

Overall leaderboard
Loading started