NodeRed and OAuth2

Hello, everyone,

I've been using Node-Red (v3.0.2) for a long time and everything has worked fine so far.
Now I am faced with the problem that I can no longer access my emails via the email node since oauth2 was introduced in Outlook. Does anyone know this problem and has a solution ready?

thanks for your help

I think you need to get an application password:

Hi, thanks for your reply. So if I understand correctly, all I have to do is create the application password and use that as the new user password in the email node?

Been a while since I tried but basically I believe that is the approach, yes.

I created an Application Password and used it as the new user password. Unfortunately it doesn't work that way. I have attached a picture of the config with my parameters. Have you already solved the problem with OAuth2 yourself in this way? Do you see an error in my parameters? Is it correct to use IMAP?

Thanks for your help.

I have done it in the past but not recently I'm afraid. I know that Microsoft made a fair few changes in January so I don't know if that has impacted things.

I assume this is a personal account rather than Office 365 business/enterprise?

I am in the same boat, and found this:

Microsoft Basic Auth Deprecation

It's been in the pipeline for years apparently. The new method is OAuth2.0, which is not supported by the email node yet. I am going to request this feature and make a pull request on the repo - I think many people will be crying out for this shortly.

In the meantime, I think you can achieve IMAP access by using http request nodes and manually sending the commands to server along with a valid token. The process on the Office 365 side as described by Microsoft is here:

Using OAuth to Authenticate IMAP, POP, or SMTP