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, port587, 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.

Report
All responses (
Answers (