Configure SMTP OAuth for a Shared Microsoft Mailbox

Beginning with Tableau Server version 2025.1.11 you can use SMTP with OAuth to send email to server administrators about system failures, and email server users about subscribed views and data-driven alerts. After configuring SMTP with OAuth, complete the steps to configure notifications (Configure Server Event Notification), then when you start or restart the server, it will trigger an email notification, which confirms that you have set up notifications correctly.

Configuring SMTP with OAuth requires that you restart Tableau Server services.

SMTP with OAuth

This example explains how to configure Tableau Server to send email using SMTP configured with OAuth (client credentials) on behalf of a Microsoft 365 shared mailbox.

Disclaimer: This documentation includes a brief overview of the external configuration steps necessary but focuses on the configuration in Tableau Server. You are responsible for configuring the external, shared mailbox correctly. You can find detailed instructions in the Microsoft documentation(Link opens in a new window).

External steps in Microsoft to configure SMTP with OAuth

The external configuration steps you need to perform may include some or all of these:

  1. Registering an app in Microsoft Entra. Steps include creating an app registration, adding API permissions, and creating a client secret:

  2. Installing any required PowerShell Modules and connecting.

  3. Getting the Entra app Service Principal.

  4. Creating an Exchange Online Service Principal.

  5. Creating a shared mailbox (if one does not exist).

  6. Assigning permissions to the app: Full Access (optional) and Send As (required).

  7. Enabling SMTP Auth.

Configure Tableau Server for SMTP OAuth with Microsoft Office 365

  1. Enable OAuth on Tableau Server:

    tsm configuration set -k svcmonitor.notification.smtp.microsoftoauth.enabled -v true
    tsm configuration set -k svcmonitor.notification.smtp.microsoftoauth.oauth_feature_enabled -v true
  2. Configure SMTP:

    tsm configuration set -k svcmonitor.notification.smtp.server -v smtp.office365.com
    tsm configuration set -k svcmonitor.notification.smtp.ssl_enabled -v true
  3. Configure client credentials:

    tsm configuration set -k svcmonitor.notification.smtp.microsoftoauth.api_host -v login.microsoftonline.com
    tsm configuration set -k svcmonitor.notification.smtp.microsoftoauth.api_endpoint -v /oauth2/v2.0/token
    tsm configuration set -k svcmonitor.notification.smtp.microsoftoauth.scope -v https://outlook.office365.com/.default
    tsm configuration set -k svcmonitor.notification.smtp.microsoftoauth.tenant_id -v [TENANT_ID]
    tsm configuration set -k svcmonitor.notification.smtp.microsoftoauth.client_id -v [CLIENT_ID]
    tsm configuration set -k svcmonitor.notification.smtp.microsoftoauth.client_secret -v [CLIENT_SECRET]
    tsm configuration set -k svcmonitor.notification.smtp.from_address -v [SHARED_MAILBOX_ID]
    tsm configuration set -k svcmonitor.notification.smtp.send_account -v [SHARED_MAILBOX_ID]
  4. Run the tsm pending-changes apply command to apply the changes. See tsm pending-changes apply.

  5. Run the tsm email test-smtp-connection to view and verify the connection configuration. See tsm email test-smtp-connection.

 

Thanks for your feedback!Your feedback has been successfully submitted. Thank you!