Connect Tableau Server to the Salesforce Data Cloud
Note: Data Cloud was previously called Customer Data Platform.
Tableau Server (version 2023.3 and later)
The Salesforce Data Cloud connector was released for Tableau Desktop and Tableau Prep in 2023.2, for Tableau Cloud in June 2023, and for Tableau Server in 2023.3. This connector seamlessly connects Tableau to Data Cloud, and is available for Tableau Desktop, Tableau Cloud, Tableau Server, and Tableau Prep. Compared to the earlier Customer Data Platform connector, the Salesforce Data Cloud connector is simpler to set up, recognizes Data Spaces, presents clearer object labels, and is powered by accelerated queries. See the steps below.
Note: The Customer Data Platform connector was deprecated in Tableau Server 2023.3 and can't be used for new connections starting in Tableau Server 2024.2. Existing workbooks, data sources, and other assets that use the Customer Data Platform connector will continue to work until the connector is completely removed, typically 1-2 releases after deprecation. To ensure that existing assets continue to function, Tableau strongly recommends customers modify existing assets to use the Salesforce Data Cloud connector.
Step 1: Create a Salesforce connected app
The Salesforce Data Cloud connector requires you to create a connected app in Salesforce.
Both the Salesforce Data Cloud connector and the Salesforce connector can use the same connected app. Therefore, if you are already using the Salesforce connector, you only need to add the three Customer Data Platform scopes listed in step 7 to your existing connected app.
- Sign in to your Salesforce.com developer account, click your user name in the upper-right, and then select Setup.
- In the left navigation column, under Apps, select App Manager.
- In the Connected Apps section, click New Connected App.
- In Basic Information, give the app a name, tab through the APIfield so it will auto-populate in the correct format, and enter a contact email for the app.
- In the API [Enable OAuth Settings] section, select Enable OAuth Settings.
- In the new OAuth settings that appear, for Callback URL, type the fully qualified domain name of your server, using the
https
protocol, and append the following text to the URL:auth/add_oauth_token
.
For example:https://www.your_tableau_server.com/auth/add_oauth_token
- Move the following items from Available OAuth Scopes to Selected OAuth Scopes:
- Access the identity URL service (id, profile, email, address, phone)
- Manage user data via APIs (api)
- Perform requests any time (refresh_token, offline access)
- Perform ANSI SQL queries on Customer Data Platform data (cdp_query_api)
- Manage Customer Data Platform profile data (cdp_profile_api)
- Manage Customer Data Platform Ingestion API data (cdp_ingest_api)
- Click Save.
After you save the app, Salesforce populates the API section with the following IDs that you will use to configure Tableau Server:
- Consumer Key
- Consumer Secret
- Callback URL
Step 2: Configure Tableau Server for Salesforce.com OAuth
Once your connected app is created in Salesforce and you have the Customer Key, Customer Secret, and the Callback URL, you can configure Tableau Server for Salesforce data connections and outputs, and Einstein Discovery.
- On the Tableau Server computer, at a command prompt, run the following commands:
tsm configuration set -k oauth.salesforce.client_id -v <your_customer_key>
tsm configuration set -k oauth.salesforce.client_secret -v <your_customer_secret>
tsm configuration set -k oauth.salesforce.redirect_uri -v <your_redirect_URL>
- (Optional) To change the default login server, type the following command:
tsm configuration set -k oauth.salesforce.server_base_url -v <URL>
- Enter the following command to apply changes:
tsm pending-changes apply
If the pending changes require a server restart, the pending-changes apply command will display a prompt to let you know a restart will occur. This prompt displays even if the server is stopped, but in that case there is no restart. You can suppress the prompt using the--ignore-prompt
option, but this does not change the restart behavior. If the changes do not require a restart, the changes are applied without a prompt. For more information, see tsm pending-changes apply.
Configure custom OAuth for a site
For setup instructions, see the OAuth Connections topic.
Tableau Server (version 2023.1 and earlier)
Warning: The Customer Data Platform was deprecated in October 2023 and is unavailable in Tableau Server 2024.2 and later. To ensure that assets continue to function, Tableau recommends that customers modify existing assets to use the Salesforce Data Cloud connector.
This section describes how to connect from Tableau Server to the Salesforce Customer Data Platform through OAuth authentication.
The steps described in this section are required to use Salesforce Customer Data Platform data in Tableau Server.
Step 1: Set up the connector
- Download the latest Salesforce Customer Data Platform connector (Salesforce_CDP.taco file) from the Tableau Exchange Connectors site.
- Move the.taco file to the Tableau connector folder:
- Windows:
C:\Users[Windows User]\Documents\My Tableau Repository\Connectors
- Linux:
/opt/tableau/connectors
OR/var/opt/tableau_server/data/tabsvc/vizqlserver/Connectors/
- Restart Tableau Server.
Step 2: Install the Customer Data Platform JDBC driver
Note: Tableau version 2023.1 for Server is only compatible with JDBC driver version 18 and above.
- Download the latest JDBC driver (Salesforce-CDP-jdbc-[version].jar file) from the Salesforce CDP GitHub site: https://github.com/forcedotcom/Salesforce-CDP-jdbc/releases
- Move the downloaded Salesforce-CDP-jdbc-[version].jar file to the following location:
- Windows:
C:\Program Files\Tableau\Drivers
- Linux:
/opt/tableau/tableau_driver/jdbc
Step 3: Create a Salesforce connected app
After creating the API scopes, use the following procedure to create a Salesforce connected app to handle OAuth delegation from Tableau Server.
-
Sign in to your Salesforce Customer Data Platform account as an admin, click your username in the upper-right, and then select Setup.
-
In the left pane, under Apps, select App Manager.
-
In the Connected Apps section, click New Connected App.
-
In Basic Information, give your connected app a name (for example, Example.com), tab through the API field so it self-populates in the correct format, and enter a contact email address for the app.
-
In the API [Enable OAuth Settings] section, select Enable OAuth Settings, and then do the following:
-
In the new OAuth settings that appear, for Callback URL, type the fully qualified domain name (FQDN) of your Tableau Server, using the
https
protocol, and append the following text to the URL:/auth/add_oauth_token
.For example:
https://example.com/auth/add_oauth_token
-
Move the following items from Available OAuth Scopes to Selected OAuth Scopes:
- Manage user data via APIs (api)
- Perform requests on your behalf at any time (refresh_token, offline_access)
- Manage Customer Data Cloud profile data (cdp_profile_api)
- Perform ANSI SQL queries on Customer Data Platform data (cdp_query_api)
-
-
When finished, click Save.
-
Go to your App Manager list, navigate to your connected app, click the dropdown arrow, and then select Manage.
After you save the app, the API (Enable OAuth Settings) section is populated with the following IDs that you'll use to configure Tableau Server:
- Consumer Key
- Consumer Secret
- Callback URL
Note: Save your Consumer Key, Secret, and Callback URL for use later.
Use OAuth with the Customer Data Platform
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.
After the connected app is created in Salesforce and you have the Consumer Key, Consumer Secret, and the Callback URL, you can configure Tableau Server for the Customer Data Platform OAuth connections. To get started gather the following information.
- Consumer Key: The Consumer Key, also known as the client ID in Tableau, is generated from the procedure at the end of Step 4. Use this value for
[your_consumer_key]
in the following tsm command. - Consumer Secret: The Consumer Secret, also known as the client secret in Tableau, is generated from the procedure at the end of Step 4. Use this value for
[your_consumer_secret]
in the following tsm command. - Callback URL: The Callback URL, also know as the redirect URL in Tableau, is you Tableau Server URL
https://example.com
and "/auth/add_oauth_token
" appended to it. Use this value for[your_callback_url]
in the following tsm command. - Configuration ID: The value for the
oauth.config.id
parameter you use in the following tsm:customer_360_audience
Use TSM Commands for OAuth Setup
Run the following tsm commands to configure OAuth.
tsm configuration set -k oauth.config.clients -v "[{\"oauth.config.id\":\"customer_360_audience\", \"oauth.config.client_id\":\"[your_consumer_key]\", \"oauth.config.client_secret\":\"[your_consumer_secret]\", \"oauth.config.redirect_uri\":\"[your_callback_url]\"}]" --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\":\"custom_360_audience\", \"oauth.config.client_id\":\"[your_consumer_key]\", \"oauth.config.client_secret\":\"[your_consumer_secret]\", \"oauth.config.redirect_uri\":\"[your_callback_url]\"}, {\"oauth.config.id\":\"dremio\", \"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_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\"}]" --force-keys
tsm pending-changes apply
Step 1: Register OAuth client ID and client secret
Complete the following procedure to register the custom OAuth client to your site.
- Sign into Tableau Server using your site admin credentials and navigate to the Settings page.
- Under OAuth Clients Registry, select the Add OAuth Client button.
- For Connection Type, select Customer Data Platform.
- For OAuth Provider, select Custom IDP.
- Enter the Client ID.
- Enter the Client Secret.
- Enter the Redirect URL.
- For Choose OAuth Config File, select the Choose a file button to upload the config file.
- Select the Add OAuth Client button to complete the registration process.
- Select the Save button at the bottom or top of the Settings page to save changes.
Step 2: Validate and update saved credentials
To help ensure uninterrupted data access, you (and your site users) must delete any previous saved credentials and add them again.
- Navigate to your My Account Settings page.
- Under Saved Credentials for Data Sources, select Delete next to the existing saved credentials.
- Next to the same connector, select Add.
- Follow the prompts to connect to the Customer Data Platform connector.
- Select Save.
Step 3: Notify users to update their saved credentials
Make sure you notify your site users to update their saved credentials for the Customer Data Platform connector. Site users can use the procedure described in Manage Saved Credentials for Data Connections to update their saved credentials.
See also
- Salesforce Help: Set Up Tableau in Customer Data Platform
- Salesforce Help: Enable Customer Data Platform in Tableau
- Salesforce Help: Using Customer Data Platform Data in Tableau