Cannot send email with office365 SMTP OAuth client

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

and on Azure I these are the API Permissions:

This is the scope I am using:

This is the SMTP server settings:

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

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

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

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.

1 Like

Can please you describe your setup process in Office365.

I want to see if I'm missing something.