# MS365 Send email

**URL:** <https://discourse.nodered.org/t/ms365-send-email/97291>\
**Category:** General\
**Created:** [27 May 2025 11:37 UTC](https://discourse.nodered.org/t/ms365-send-email/97291 "2025-05-27T11:37:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![keyooo2](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@keyooo2](https://discourse.nodered.org/u/keyooo2)\
**Post date:** [27 May 2025 11:37 UTC](https://discourse.nodered.org/t/ms365-send-email/97291/1 "2025-05-27T11:37:38Z")

</div>

Hello,  
What do I need to do on the corporate admin365 side to be able to send emails from a distribution box or emial with a password from server [smtp.office365.com](http://smtp.office365.com)

"Error: Invalid login: 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [[WA2P291CA0028.POLP291.PROD.OUTLOOK.COM](http://WA2P291CA0028.POLP291.PROD.OUTLOOK.COM) 2025-05-27T11:32:59.054Z 08DD9C8869AEB511]"

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [27 May 2025 13:14 UTC](https://discourse.nodered.org/t/ms365-send-email/97291/2 "2025-05-27T13:14:52Z")

</div>

You need to speak to your M365 admin. You will need to register an app in Azure Active Directory (AAD). Programmatic access to M365 is not permitted except via registered apps.

---

<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:** [27 May 2025 13:35 UTC](https://discourse.nodered.org/t/ms365-send-email/97291/3 "2025-05-27T13:35:07Z")

</div>

And once you register an App, you will intern get a Client Secret & App ID.  
Using that will yield a token (OAuth token) that will need to be used for authentication against Graph.

When registering the app, ensure ONLY impersonation is allowed in the API perms, not Application Context - else someone getting your API keys, can send from ANY mailbox, BAD!

With impersonation, both API keys, and the senders identity creds are needed.  
All this is a little outside of the scope on the forums, but plenty of guides on the web.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [27 May 2025 14:35 UTC](https://discourse.nodered.org/t/ms365-send-email/97291/4 "2025-05-27T14:35:14Z")

</div>

But the bottom line is that you will not be able to do anything without the support of your corporate IT department who will (if they are of any use at all) tightly control access to Azure AD.

---

<div class="post-metadata">

**Author:** ![leftymuller](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leftymuller/32/102326_2.png) [@leftymuller](https://discourse.nodered.org/u/leftymuller)\
**Post date:** [3 June 2025 02:46 UTC](https://discourse.nodered.org/t/ms365-send-email/97291/5 "2025-06-03T02:46:12Z")

</div>

I gave up on 365 smtp... just get a free smtp2go account and use basic auth

Nice... easy.. works

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [3 June 2025 08:31 UTC](https://discourse.nodered.org/t/ms365-send-email/97291/6 "2025-06-03T08:31:05Z")

</div>

> [@leftymuller](#):
>
> I gave up on 365 smtp... just get a free smtp2go account and use basic auth

Though, if you are using that for work, you probably just broke a load of organisation policies, maybe even some terms and conditions of use.

---

<div class="post-metadata">

**Author:** ![leftymuller](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leftymuller/32/102326_2.png) [@leftymuller](https://discourse.nodered.org/u/leftymuller)\
**Post date:** [4 June 2025 14:52 UTC](https://discourse.nodered.org/t/ms365-send-email/97291/7 "2025-06-04T14:52:27Z")

</div>

I pay for smtp2go and I make the policies so I guess im are fine 🙂

---

<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:** [2 September 2025 14:53 UTC](https://discourse.nodered.org/t/ms365-send-email/97291/8 "2025-09-02T14:53:24Z")

</div>

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