Starting in Tableau 2021.1, the Azure Synapse, Azure SQL Database, Azure Databricks, and Azure Data Lake Gen2 connectors support authentication through Azure AD by configuring an OAuth client for Tableau Server.

Note: OAuth support for Azure AD is only supported with Microsoft SQLServer driver 17.3(Link opens in a new window) and later.

Step 1: Register OAuth client for Azure

See the Tableau Community post, Azure Application Registration for On-Prem Server OAuth(Link opens in a new window).

Step 2: Configure Tableau Server for Azure

Configuring Tableau Server requires running a Tableau Server Management (TSM) command. Azure Data Lake Storage Gen2 requires a different set of commands than the common command that is run for Azure Synapse, Azure SQL Database, or Databricks.

Configure default OAuth client for Azure Data Lake Storage Gen2

To configure Tableau Server for Data Lake Storage Gen2, you must have the following configuration parameters:

  • Azure OAuth client ID: The client ID is generated from the procedure in Step 1. Copy this value for [your_client_id] in the first tsm command.
  • Azure OAuth client secret: The client secret is generated from the procedure in Step 1. Copy this value for [your_client_secret] in the second tsm command.
  • Tableau Server URL: Enter your Tableau Server URL, such as https://myco.com. Copy this value for [your_server_url] in the third tsm command.

Run the following tsm commands to configure Tableau Server OAuth for Azure Data Lake Storage Gen2:

  • tsm configuration set -k oauth.azuredatalake_storage_gen2.client_id -v [your_client_id] --force-keys
  • tsm configuration set -k oauth.azuredatalake_storage_gen2.client_secret -v [your_client_secret] --force-keys
  • tsm configuration set -k oauth.azuredatalake_storage_gen2.redirect_uri -v http://[your_server_url]/auth/add_oauth_token --force-keys
  • tsm pending-changes apply

Server Restart Scenarios

After you configure a default OAuth client, the following scenarios can occur.

  • A restart prompt appears if the pending changes require a server restart.
  • You can suppress the prompt using the --ignore-prompt option, but this doesn’t stop the restart.
  • If the changes don't require a restart, the changes are applied without a prompt. For more information, see tsm pending-changes apply.

Configure default client for Azure Synapse, Azure SQL Database, or Databricks

To configure Tableau Server, you must have the following configuration parameters:

  • Azure OAuth client ID: Generated from the procedure in Step 1. Copy this value for [your_client_id] in the tsm command.
  • Azure OAuthClient secret: Generated from the procedure in Step 1. Copy this value for [your_client_secret] in the second tsm command.
  • Tableau Server URL: This is your Tableau Server URL, such as https://myserver.com. Copy this value for [your_server_url] in the third tsm command.
  • Configuration ID: The value for the oauth.config.id parameter in the following tsm command. Valid values:
    • Azure Synapse: azure_sql_dw
    • Azure SQL Database: azure_sqldb
    • Databricks: databricks

Run the following tsm commands to configure Azure AD for Azure Synapse, Azure SQL Database, or Databricks. For example, to set up Azure Synapse:

tsm configuration set -k oauth.config.clients -v "[{\"oauth.config.id\":\"azure_sql_dw\", \"oauth.config.client_id\":\"[your_client_id]\", \"oauth.config.client_secret\":\"[your_client_secret]\", \"oauth.config.redirect_uri\":\"[your_server_url]/auth/add_oauth_token\"}]" --force-keys

tsm pending-changes apply

Setting multiple connectors

If you have multiple connectors to set, you must include all of them in a single command. For example:

tsm configuration set -k oauth.config.clients -v "[{\"oauth.config.id\":\"azure_sql_dw\", \"oauth.config.client_id\":\"[your_client_id]\", \"oauth.config.client_secret\":\"[your_client_secret]\", \"oauth.config.redirect_uri\":\"[your_server_url]/auth/add_oauth_token\"}, {\"oauth.config.id\":\"azure_sqldb\", \"oauth.config.client_id\":\"[your_client_id]\", \"oauth.config.client_secret\":\"[your_client_secret]\", \"oauth.config.redirect_uri\":\"[your_server_url]/auth/add_oauth_token\"}, {\"oauth.config.id\":\"databricks\", \"oauth.config.client_id\":\"[your_client_id]\", \"oauth.config.client_secret\":\"[your_client_secret]\", \"oauth.config.redirect_uri\":\"[your_server_url]/auth/add_oauth_token\"}]" --force-keys

tsm pending-changes apply

Configure a default OAuth client for OneDrive and SharePoint Online

To configure Tableau Server for OneDrive and SharePoint Online, you must have the following configuration parameters:

  • Azure OAuth client ID: The client ID is generated from the procedure in Step 1. Copy this value for [your_client_id] in the first tsm command.
  • Azure OAuth client secret: The client secret is generated from the procedure in Step 1. Copy this value for [your_client_secret] in the second tsm command.
  • Tableau Server URL: This is your Tableau Server URL, such as https://myco.com. Copy this value for [your_server_url] in the third tsm command.

Run the following tsm commands to configure Tableau Server OAuth for Azure Data Lake Storage Gen2:

  • tsm configuration set -k oauth.onedrive_and_sharepoint_online.client_id -v [your_client_id] --force-keys
  • tsm configuration set -k oauth.onedrive_and_sharepoint_online.client_secret -v [your_client_secret] --force-keys
  • tsm configuration set -k oauth.onedrive_and_sharepoint_online.redirect_uri -v http://[your_server_url]/auth/add_oauth_token --force-keys
  • tsm pending-changes apply

Server Restart Scenarios

After you configure a default OAuth client, the following scenarios can occur.

  • A restart prompt appears if the pending changes require a server restart.
  • You can suppress the prompt using the --ignore-prompt option, but this doesn’t stop the restart.
  • If the changes don't require a restart, the changes are applied without a prompt. For more information, see tsm pending-changes apply.

Configure custom OAuth for a site

You can configure custom Azure Data Lake Storage Gen2, Azure Synapse, Azure SQL Database, and Databricks OAuth clients for a site.

Consider configuring a custom OAuth client to 1) override an OAuth client if configured for the server or 2) enable support for securely connecting to data that requires unique OAuth clients.

When a custom OAuth client is configured, the site-level configuration takes precedence over any server-side configuration and all new OAuth credentials created use the site-level OAuth client by default. No Tableau Server restart is required for the configurations to take effect.

Important: Existing OAuth credentials established before the custom OAuth client is configured are temporarily usable but both server administrators and users must update their saved credentials to help ensure uninterrupted data access.

Step 1: Prepare the OAuth client ID, client secret, and redirect URL

Before you can configure the custom OAuth client, you need the information listed below. After you have this information prepared, you can register the custom OAuth client for the site.

  • OAuth client ID and client secret: First register the OAuth client with the data provider (connector) to retrieve the client ID and secret generated for Tableau Server.

  • Redirect URL: Note the correct redirect URL. You will need this during the registration process in Step 2 below.

    https://<your_server_name>.com/auth/add_oauth_token

    For example, https://example.com/auth/add_oauth_token

Step 2: Register the OAuth client ID and client secret

Follow the procedure described below to register the custom OAuth client to the site.

  1. Sign in to your Tableau Server site using your admin credentials and navigate to the Settings page.

  2. Under OAuth Clients Registry, click the Add OAuth Client button.

  3. Enter the required information, including the information from Step 1 above:

    1. For Connection Type, select the connector whose custom OAuth client you want to configure.

    2. For Client ID, Client Secret, and Redirect URL, enter the information you prepared in Step 1 above.

    3. Click the Add OAuth Client button to complete the registration process.

  4. (Optional) Repeat step 3 for all supported connectors.

  5. Click the Save button at the bottom or top of the Settings page to save changes.

Step 3: Validate and update saved credentials

To help ensure uninterrupted data access, you (and your site users) must delete the previous saved credentials and add it again to use the custom OAuth client for the site.

  1. Navigate to your My Account Settings page.

  2. Under Saved Credentials for Data Sources, do the following:

    1. Click Delete next to the existing saved credentials for the connector whose custom OAuth client you configured in Step 2 above.

    2. Next to connector name, click Add and follow the prompts to 1) connect to the custom OAuth client configured in Step 2 above and 2) save the latest credentials.

Step 4: Notify users to update their saved credentials

Make sure you notify your site users to update their saved credentials for the connector whose custom OAuth client you configured in Step 2 above. Site users can use the procedure described in Update saved credentials to update their saved credentials.

Forward proxy for OAuth authentication

For more information about setting up a forward proxy with OAuth authentication for Tableau Server (Windows only), see Configure a Forward Proxy for OAuth Authentication(Link opens in a new window) in the Tableau Help.

Thanks for your feedback!