Node-red-node-email example with Office 365

Hi all,

I need to send emails using the node-red-node-email node.
In the past I used a Google email and everything worked easily thanks to the "Auth Type" option configured on "Basic".

But now I have to migrate the structure to an office 365 account but I'm really confused on how to use "Auth Type" in "XOAuth2" configuration.
I see that a token is needed but I can't understand where I can get this token from, should I make an hhtp get request to the organization's office365 server? Or am I totally wrong? Could someone give me an implementation example? I couldn't find an example on the web

I add the image below to explain myself better
image

Thanks in advance for the support

According to https://flows.nodered.org/node/node-red-node-email

Office 365 users

If you are accessing Exchnage you will need to register an application through their platform and use OAuth2.0. Details on how to do this can be found here.

Have you visited that Microsoft page?

yes, but I don't undestand how I should take this token
image

An example for this would be really helpful :slight_smile:

Who manages your 365 instance? Can you request the token config from them?

I've given up with O365 TBH but reading this post you need to get the token using the node-red-contrib-oauth2 (node) - Node-RED node.

I moved to SMTP2GO by the way - it way more manageable and does not impact any 'normal' mail accounts.

1 Like

For O365, you have to register your endpoint as an API endpoint in Azure Active Directory. When you do that, you will get the API tokens you need.

The use of the global cloud platforms like Azure and AWS is not simple and you should, as Andrew says, get support from your Azure/O365 admins since they will, in any case, be the only people permitted to register your API app.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.