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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

SMTP Error 535 with OAuth 2.0 in Business Central Online v28 — Microsoft 365 corporate account

(0) ShareShare
ReportReport
Posted on by

Problem

I'm trying to set up an SMTP account with OAuth 2.0 in Business Central Online v27+ to send emails from a Microsoft 365 corporate mailbox, but I always get:

"The SMTP server rejected the authentication request because the authentication data is not correct. Verify that the user name and password are correct and that the SMTP server supports the specified authentication type (OAuth 2.0). SMTP error code: 535."

 

What I've already done

Azure Portal (Microsoft Entra ID):


  • Registered an app (SMTP_OAuth_App), single tenant

  • Redirect URI: https://businesscentral.dynamics.com/OAuthLanding.htm

  • API permissions (Microsoft Graph, delegated): SMTP.Send, offline_access, openid, User.Read — all with admin consent granted (green checkmarks)

  • Client Secret created


  •  

Microsoft 365 Admin Center:


  • "Authenticated SMTP" enabled for both the sending user and the tenant admin

  • User has an active Exchange Online license


  •  

Business Central:


  • "Email Microsoft Entra App Registration" page configured with Client ID, Client Secret and Redirect URL

  • "Check Registration" returns: "Authentication verified successfully"

  • SMTP account: server smtp.office365.com, port 587, authentication OAuth 2.0

  • Sender type: Specific User

  • "Use your own app registration" toggle enabled with Client ID, Secret and Tenant ID


  •  

Result: Registration check passes, but sending a test email always returns SMTP error 535.

Environment


  • Business Central Online v28

  • Single tenant (BC and mailbox in the same tenant)

  • Microsoft 365 mailbox with Exchange Online

  •  

Question

What am I missing to make SMTP with OAuth 2.0 work with "Specific User"? Do I need to use client credentials flow (SMTP.SendAsApp application permission) instead of delegated permissions (SMTP.Send) for this scenario? If so, has anyone successfully configured SMTP.SendAsApp with the Exchange Online Service Principal for BC?

Any guidance is appreciated.

I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,909 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,145 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 974

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans