# Cannot send email with office365 SMTP OAuth client

**URL:** <https://forum.inductiveautomation.com/t/cannot-send-email-with-office365-smtp-oauth-client/101483>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 28, 2025, 11:57am UTC](https://forum.inductiveautomation.com/t/cannot-send-email-with-office365-smtp-oauth-client/101483 "2025-01-28T11:57:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [January 28, 2025, 11:57am UTC](https://forum.inductiveautomation.com/t/cannot-send-email-with-office365-smtp-oauth-client/101483/1 "2025-01-28T11:57:38Z")

</div>

Hi all ,

When I try sending out a test email from the email profile which uses office365 smtp

I get `javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful`

I have a token setup

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/6/26392ff4b6d79f109acee2d0d43d17beb3526b55.png)

and on Azure I these are the API Permissions:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/2/c244f037ec2649cf82e2e520e486b8eb6d887ab6.png)

This is the scope I am using:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/b/cb72ffedf54a3a10dbe3fd7d384489fe8ac6f332.png)

This is the SMTP server settings:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/24cc0760ebd823bee3958ba291975aa0a4239421.png)

What am I doing wrong , is there a setting that I have missed?

---

<div class="post-metadata">

**Author:** ![Alex\_Guyer1](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@Alex\_Guyer1](https://forum.inductiveautomation.com/u/Alex_Guyer1)\
**Post date:** [February 5, 2025, 4:14pm UTC](https://forum.inductiveautomation.com/t/cannot-send-email-with-office365-smtp-oauth-client/101483/2 "2025-02-05T16:14:03Z")

</div>

I am experiencing this same error after an update to 8.1.45 from 8.1.28.  
Were you able to find the solution?

Digging into this further it is likely a config on the Exchange Online configuration.  
[Authentication unsuccessful (from - Microsoft Community](https://answers.microsoft.com/en-us/outlook_com/forum/all/authentication-unsuccessful-from/314e1cc4-bc72-456c-b0e9-e6f9d0493879)

Still troubleshooting currently. Re-enabling the TLSv1 and TLSv1.1 in the java.security did not resolve the problem.

---

<div class="post-metadata">

**Author:** ![Alex\_Guyer1](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@Alex\_Guyer1](https://forum.inductiveautomation.com/u/Alex_Guyer1)\
**Post date:** [February 6, 2025, 1:09pm UTC](https://forum.inductiveautomation.com/t/cannot-send-email-with-office365-smtp-oauth-client/101483/3 "2025-02-06T13:09:35Z")

</div>

Quick update on this- I was actually using Classic not OAuth like OP.  
The root of my issue was entirely in the Office 365 setup. The user had the license removed on their account.

---

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [February 6, 2025, 1:58pm UTC](https://forum.inductiveautomation.com/t/cannot-send-email-with-office365-smtp-oauth-client/101483/4 "2025-02-06T13:58:52Z")

</div>

Can please you describe your setup process in Office365.

I want to see if I'm missing something.
