SMTP OAuth setup with Microsoft Exchange Online
Sign in to Azure Portal
Register a New App
Navigate to App registrations
Select App registrations from the left menu
Click '+New registration'.
Fill out:
Click 'Register'
After registration, note:
Create a Client Secret
Copy the value immediately - it is your Client Secret. You cannot view it later.
Assign API Permissions
Select “APIs my organization uses”.
Search for and select “Microsoft Graph”.
Choose “Application permissions”.
Expand Mail and check “Mail.Send”.
Click “Add permissions”.
Click “Grant admin consent” to approve.
Tenant ID: Found in Azure AD → Directory ID.
Client ID: Found in Azure AD → Application ID
Client Secret: Copied from Certificates & Secrets
SMTP Scope: Mail.Send for Microsoft Graph.