This solution combines the power of the Salesforce Platform with Tableau Connected Apps (CA) and User Attribute Functions (UAF) to enforce data security in a modern, scalable, and developer-friendly manner. Specifically, developers can dynamically query Salesforce Objects using Salesforce Object Query Language (SOQL), at runtime, to programmatically fetch data authorizations and pass those to Tableau using Connected Apps Direct trust and JSON Web Tokens (JWT) to enforce data security for Tableau Dashboards.
When the component page loads in a browser or when a user clicks on a Tableau content link in the sidebar menu the InitViz() function is triggered. This function performs the following steps:
- It calls the Apex method generateJWT() to create a JSON Web Token (JWT).
- It constructs the URL for the Tableau content.
- It passes both the JWT and the URL to the Tableau Embedding v3 API.
The Tableau Embedding v3 API then initiates the AuthN/Z flow with Tableau, automatically passing the JWT to Tableau for secure user authentication using Single Sign-On (SSO). This authentication is facilitated by Tableau Connected Apps.
Once authenticated, the Tableau Viz or Pulse Metric is loaded directly within the component's page. The authentication process leverages Tableau Connected Apps and JWT to enforce data security throughout the authenticated user's session. The user's Account Name (in this case, "Wheelworks") is included in the JWT as the "Account" claim, which serves as a data authorization or entitlement to provide the user secure access to only records associated with the Wheelworks account.
For more information on JSON Web Tokens (JWT), visit jwt.io.
- Integrate AI Powered Insights into Your Customer Journeys (video)
- Configure a Component for Experience Builder
- Tableau Insights Delivered Directly to Salesforce
- Tableau Embedding API v3
- Exploring the E-Bikes Sample App (video)
- Tableau Postman Collection for the Tableau REST API
- Manage Trusted URLs
- Unlock the Power of Personalized Analytics with User Attribute Functions
Now that you’ve created a Salesforce DX project, what’s next? Here are some documentation resources to get you started.
Do you want to deploy a set of changes, or create a self-contained application? Choose a development model.
The sfdx-project.json
file contains useful configuration information for your project. See Salesforce DX Project Configuration in the Salesforce DX Developer Guide for details about this file.