# 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:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebnerjoh](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@ebnerjoh](https://discourse.nodered.org/u/ebnerjoh)\
**Post date:** [25 April 2023 05:57 UTC](https://discourse.nodered.org/t/email-node-and-oauth-with-m365/77903/1 "2023-04-25T05:57:17Z")

</div>

Hello,

I want to check emails with the Email Node on a M365 Mailbox.  
the Email Node should support it, but I was not able to find a "Starter" Document on how the OAuth flow could be done.

Br,  
JOhannes

---

<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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 June 2023 10:19 UTC](https://discourse.nodered.org/t/email-node-and-oauth-with-m365/77903/3 "2023-06-24T10:19:27Z")

</div>

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