Hi!
I've set up oauth using the following guide; https://www.znuny.org/en/blog/modern-au ... -microsoft
Inbound email works as expected though outgoing email throws an error regarding SMTP auth.
ErrorMessage: 535, 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant.
I've verified numerous times that the configuration is correct though it seems it's ignoring the configuration (SendmailModule::AuthenticationType set to OAuth2 token) and still falls back on SMTP for authentication.
Any tips on troubleshooting this further?
Can't figure out sending through M365
Moderator: crythias
Re: Can't figure out sending through M365
I came across on this issue just 2 weeks ago. What i remember that time is a deleted Oauth2 configuration and then restarted the server. Make sure that the appropriate configuration in admin -> system configuration (Core::Email) such as the following.
SendmailModule -> Kernel::System::Email::SMTPTLS
SendmailModule::AuthUser
SendmailModule::AuthenticationType (OAuth2 token)
SendmailModule::Host -> smtp.office365.com
SendmailModule::OAuth2TokenConfigName (The name you configure on the Oauth2 settings)
SendmailModule -> Kernel::System::Email::SMTPTLS
SendmailModule::AuthUser
SendmailModule::AuthenticationType (OAuth2 token)
SendmailModule::Host -> smtp.office365.com
SendmailModule::OAuth2TokenConfigName (The name you configure on the Oauth2 settings)
-
- Moderator
- Posts: 436
- Joined: 30 Jan 2008, 02:26
- Znuny Version: All of them ^^
- Real Name: Hannes
- Company: Znuny|OTTERHUB
Re: Can't figure out sending through M365
Hi,alltidtim wrote: ↑13 Aug 2025, 17:42 Hi!
I've set up oauth using the following guide; https://www.znuny.org/en/blog/modern-au ... -microsoft
Inbound email works as expected though outgoing email throws an error regarding SMTP auth.
ErrorMessage: 535, 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant.
I've verified numerous times that the configuration is correct though it seems it's ignoring the configuration (SendmailModule::AuthenticationType set to OAuth2 token) and still falls back on SMTP for authentication.
Any tips on troubleshooting this further?
It says it right in the message.
"SmtpClientAuthentication is disabled for the Tenant"
Check your tenant config:
https://learn.microsoft.com/en-us/excha ... submission
and if it is enabled, it should work
Regards