Microsoft has deprecated basic SMTP authentication for most tenants. OAuth 2.0 via Microsoft Graph is now the recommended and more secure approach. This setup allows applications to send email without storing mailbox passwords.
Before you begin, ensure the following are available:
⚠️ Note: Application permissions require admin consent and cannot be approved by regular users.
Log in to Microsoft Entra ID
Navigate to: Applications → App registrations → New registration
Fill in the form:
Name: Email OAuth
Supported account types: Single tenant
Redirect URI: Not required
Click Register
After registration, copy and securely store:
Directory (tenant) ID → TENANT_ID
Application (client) ID → CLIENT_ID
Open the registered application
Navigate to: Certificates & secrets → Client secrets
Click New client secret
Define:
Description (e.g. SMTP OAuth Secret)
Expiration period (recommended: 12 or 24 months)
Click Add
⚠️ Important: Copy the Value immediately. It will not be shown again.
Client Secret Value → CLIENT_SECRET
Go to API permissions
Click Add a permission
Select Microsoft Graph
Choose Application permissions
Search and select:
Mail.Send
Click Add permissions
On the API permissions page
Click Grant admin consent
Confirm the action
✅ Status should show Granted
Once Microsoft-side configuration is complete:
Log in to the Web Application Admin Panel
Navigate to: Admin → Reseller Settings → SMTP Email Settings
Fill in the fields using:
Tenant ID
Client ID
Client Secret
Sender mailbox
After saving the SMTP settings:
Trigger a test email from the platform
Confirm:
Email is delivered successfully
No authentication errors appear
If email fails:
Reconfirm Mail.Send permission
Ensure admin consent was granted
Verify the sender mailbox exists and is licensed
Issue: Unauthorized or invalid client
Confirm Tenant ID and Client ID are correct
Ensure the secret value (not secret ID) is used
Issue: Insufficient privileges
Mail.Send permission not granted
Admin consent missing
Issue: Emails not received
Check spam/junk folder
Confirm sender address matches configured mailbox