Loading

Control View Data in Tableau View LWC Using UAF Claim Definition

Date de publication: Aug 20, 2026
Prérequis
Configure SSO with Token Authentication for Tableau Lightning Web Components (LWC) per the documentation (Please refer Additional Resources) and map the relevant Salesforce User object field (e.g., Division) to the corresponding field in the Tableau data source (e.g., Region)
Tâche

Filter Tableau dashboard view data dynamically based on the Salesforce user's attribute using UAF claim definitions in Tableau View LWC.

 

Étapes

Scenario:
Filter the [Region] data on a Tableau dashboard using the [Division] field on the Salesforce User record.
When Salesforce User A ([Division] = "East") views the dashboard in Tableau View Lightning Web Component (LWC), only data for [Region] = "East" is displayed.
When Salesforce User B ([Division] = "East", "West", "Central") views the dashboard in Tableau View LWC, data matching [Region] = "East", "West", "Central" is displayed.

UserInfo 
 

  1. Create a UAF Claim Definition in Salesforce:
    • Navigate to Setup > Tableau UAF Claims Definition and click New.
    • Configure the settings:
      • Definition Name: Region
      • Attribute Name: Region
      • Target Object: User
      • Target Object Field: Division
      • Viewer Target Object Relationship: Current Viewer is the User

    • Note: The Target Object Field depends on the admin's language setting. If your org uses multiple languages (e.g., Japanese), create an additional UAF claim definition per language using the localized field name (e.g., Definition Name: RegionJP, Target Object Field: "ディビジョン").

  2. Add the UAF Definition to the Tableau View LWC:
    • Open the Lightning Page containing the Tableau View LWC and view its properties.
    • Under UAF Definition Names, click Select.
    • Add Region (and any localized definitions like RegionJP) to Selected.
    • Click OK.
      AddUAFDefinitions 

  3. Create a calculated field in Tableau:
    • Open the target view in Tableau and create a calculated field:
    • Name: Filter by UAF
    • Formula: 
      CONTAINS(USERATTRIBUTE('Region'), [Region])
    • Note: If multiple language UAF definitions were created in Step 1, update the formula to combine them: 
      CONTAINS(USERATTRIBUTE('Region'), [Region]) OR CONTAINS(USERATTRIBUTE('RegionJP'), [Region])

       

  4. Apply the filter in Tableau:
    • Drag Filter by UAF to the Filters card.
    • Select Custom value list and manually type and add True.
      FilterSetting 

  5. Verify in Salesforce:
    • Access the Tableau View LWC in Salesforce. User A will dynamically see data matching East, and User B will see data matching East, West, and Central.
      ViewResults 
Numéro d’article de la base de connaissances

005391245

 
Chargement
Salesforce Help | Article