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)
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)
Open Gmail in a web browser.
Click the gear icon (⚙️) → See all settings.
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)
Under "Signing in to Google", enable 2-Step Verification (if not already on).
After enabling, click on this url (App passwords in gmail) to naviagte to App Password Page.
Provide a name (e.g., "Power Automate") in APP Name Textbox and click Create.
On Generate app Password Pop-up, copy that
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)
This Will works and hope your flow runs successfully. Let me know, if this query resolves and makes your day much better.
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.
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
eetuRobo
147
Super User 2025 Season 1
Riyaz_riz11
56
Super User 2025 Season 1
Nived_Nambiar
30
Super User 2025 Season 1