web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Smtp error in Business Central

(1) ShareShare
ReportReport
Posted on by 410

Hello all,

I m trying to set up SMTP and providing an office 365 user detail of another tenant but BC is through this error.

"A call to MailKit.Net.Smtp.SmtpClient.Authenticate failed with this

message: 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant."

Please note BC is on Tenant A and SMTP user is on tenant B. 

SMTP client authentication is already enabled on TENANT B.

Please help how i can fix it.

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at

    If you have set up Multifactor Authentication then you need to create App Password and then use that password instead of a regular password. You can set up one here

    mysignins.microsoft.com/security-info

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    docs.microsoft.com/.../authenticated-client-smtp-submission

    I did try to repro this scenario.

    Tenant A = tenantA.microsoft.com, this is where BC is sitting, all users have an Exchange license in Tenant A

    Tenant B = tenantB@microsoft.com, this is where Office 365 SMTP is sitting, the SMTP user is licensed in Tenant B

    Users connect via Azure AD authentication to their Exchange Online  in Tenant A  via user1@tenanta.onmicrosoft.com

    The smtp user in BC in Tenant A is as follows:

    server: smtp.office365.com

    port: 587

    username: smtp@tenantb.onmicrosoft.com

    UseSsl = True

    Password = secured string

    This scenario will work.

    It is correct that Azure AD conditional policies or security defaults policies can break the SMTP solution in BC. MFA is supported but only on a per user base where App passwords are required.

    You can verify via Send-MailMessage powershell command outside BC if mail flow works. If it does not work via PowerShell, it will also not work via BC.

    Hope it helps.

  • Asif Shahzad Profile Picture
    410 on at

    Hello Marco, thank for your reply. I did same but still not working.

    system is through error of MFA, though that is disabled.

  • Suggested answer
    Chris Bulson Profile Picture
    on at

    The solution is in the error, SMTP authentication is disabled on the tenant.  This can only be checked\fixed through Powershell.

    community.dynamics.com/.../troubleshooting-smtp-mail-setup-error-5-7-3-authentication-unsuccessful-in-dynamics-365-business-central

    You must confirm that both Basic Auth and SMTP are enabled per the 2 different articles and PowerShell examples linked in the above blog.  The only other thing that would cause this is if you have 'Conditional Access Policies' setup in AAD.  You would have to look at this through portal.azure.com to verify.

    Thanks,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,066

#2
YUN ZHU Profile Picture

YUN ZHU 658 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 595

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans