January 13, 2026
Adding items to Launch Pad Widget
Learn how to add items via My Apps Content App
In this document, we will describe how to configure XOAuth2 SMTP using OAuth2 authorization code flow. For alternative configuration approaches, please refer to the reference section at the bottom of this document.
This approach uses the OAuth2 authorization code flow with MailKit SMTP client library.
Note: .Net built-in SMTP client APIs does not support the OAuth2, as referenced in SmtpClient Class (System.Net.Mail) | Microsoft Docs
Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.5
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName <user@domain>
Set-CASMailbox -Identity <sender@domain> -SmtpClientAuthenticationDisabled $false
Get-CASMailbox -Identity <sender@domain> | Format-List SmtpClientAuthenticationDisabled
Disconnect-ExchangeOnline
Note: Use the SMTP host as smtp.office365.com when using OAuth, otherwise use smtp.sendgrid.net in tenant.settings/config
Note: A red info indicates the token is not yet acquired, a grey info
indicates the token is acquired.
Important - make sure to login with the user configured in step 1 for SmtpEmailForm