# Email Node and OAuth with M365

**URL:** <https://discourse.nodered.org/t/email-node-and-oauth-with-m365/77903>\
**Category:** General\
**Created:** [25 April 2023 05:57 UTC](https://discourse.nodered.org/t/email-node-and-oauth-with-m365/77903 "2023-04-25T05:57:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [25 April 2023 10:19 UTC](https://discourse.nodered.org/t/email-node-and-oauth-with-m365/77903/2 "2023-04-25T10:19:10Z")

</div>

Hi @ebnerjoh

On the basis you have followed this guide (specifically for **Office 365 users** )  
[node-red-node-email (node) - Node-RED (nodered.org)](https://flows.nodered.org/node/node-red-node-email)

You can then use an OAuth2 node such as  
[node-red-contrib-oauth2 (node) - Node-RED (nodered.org)](https://flows.nodered.org/node/node-red-contrib-oauth2)  
This will return your token, and you pass said token into the email fetch node.

The email fetch node will use the path as specified below when sending your `msg` to the email fetch node, so the node knows where your access token is, in your `msg`.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/1/119a39d2205a503c7e215112f12127108d85ebbf.png)

So change if necessary.

---

_[View the full topic](https://discourse.nodered.org/t/email-node-and-oauth-with-m365/77903)._
