I’m stuck trying to get Outlook SMTP working in n8n. I’ve done the usual stuff like turning on IMAP and POP, setting up two-factor auth, and making an app password. In n8n, I put in my Outlook email, the app password, and tried both smtp-mail.outlook.com and smtp.office365.com as the host. Port is 587, SSL/TLS off, STARTTLS on.
But I keep getting this error:
Couldn't connect with these settings Invalid login: 535 5.7.139 Authentication unsuccessful, basic authentication is disabled.
Any ideas what I’m doing wrong? Do I need to change something else in my Outlook settings to make this work? I’m out of ideas here. Thanks for any help!
I’ve encountered this issue with Outlook SMTP in n8n as well, and it can be quite frustrating. Microsoft’s recent security enhancements mean that basic authentication is no longer an option, so you must transition to OAuth 2.0. In my case, I had to set up an Azure AD application, configure the required API permissions, and obtain the client ID, client secret, and tenant ID. After switching from the generic SMTP node to the Microsoft Outlook node in n8n, the connection worked reliably. Although the process is a bit more involved, the improved security and stability make it worthwhile.
I ran into a similar issue when setting up Outlook SMTP in n8n recently. The error you’re seeing suggests that basic authentication has been disabled, which is actually a security measure Microsoft implemented.
Here’s what worked for me:
Instead of using an app password, I had to set up Azure AD and create an OAuth 2.0 client. It’s a bit more involved, but it’s more secure and reliable. You’ll need to register an app in Azure AD, configure the necessary permissions, and then use the client ID, client secret, and tenant ID in n8n.
In n8n, make sure you’re using the ‘Microsoft Outlook’ node instead of a generic SMTP node. This node is designed to work with OAuth 2.0 authentication for Outlook.
It took me a while to figure out, but once set up, it’s been working flawlessly. Hope this helps point you in the right direction!
hey, i had the same problem last week! microsoft turned off basic auth for outlook. u need to use oauth2 instead. it’s a pain but u gotta set up an azure ad app and use those creds in n8n. use the microsoft outlook node, not smtp. good luck!