Skip to content
Tutorials Center
My learning

Topics

Lesson 25 of 35 ยท Sharing and Security

Permissions and Row-Level Security in Tableau

Control who sees what in Tableau: roles, projects, permission rules, user filters, USERNAME() and ISMEMBEROF() calculations, data policies and an entitlement table.

Publishing a dashboard raises two separate questions. First: may this person open the workbook at all? That is permissions. Second: once they open it, which rows of data may they see? That is row-level security (RLS). A regional manager should open the Sales dashboard but see only their own region. Mixing up the two questions is the root cause of most Tableau security mistakes.

Tableau Cloud and Server enforce these rules on the site, so you cannot try them in a browser page. The steps are instructions for Tableau, and the runnable code is a stand-in: SQL and pandas that implement the same entitlement logic Tableau applies, so you can reason about it and test it with plain data.

Layer 1: who can open what

Tableau's permission model has these pieces:

  • Users have a site role (for example Creator, Explorer, Viewer, or Site Administrator), which sets the maximum they can do.
  • Groups collect users (Sales-EMEA, Finance). Always grant permissions to groups, not individuals.
  • Projects are folders. Permissions set on a project are inherited by the content inside, unless a workbook is locked out of inheritance.
  • Capabilities are the individual rights: View, Filter, Download Image/PDF, Download Summary Data, Download Full Data, Web Edit, Save, Share Customized, Delete, Move, Set Permissions.
  • Each capability can be Allowed, Denied or Unspecified.

The effective permission is the combination of the user's site role, the permissions of the user and all their groups, and the project and content settings. The rules in a nutshell:

  1. Deny wins over Allow. If any rule denies a capability, it is denied.
  2. Unspecified means "no opinion", and if nothing allows it, it is denied.
  3. The site role caps everything: a Viewer can never get Web Edit, however many Allow rules you add.
  4. A content owner and administrators bypass most of these.

Use the Effective Permissions view (Permissions > Actions > Effective Permissions) to see why somebody has or lacks a capability.

Layer 1: permissions

Site role The ceiling for each user.
Groups Grant to groups, not people.
Projects Content inherits project rules.
Deny wins One Deny beats every Allow.
1 / 2

Layer 2: row-level security

With RLS the same workbook shows different rows to different users. Tableau offers several ways; pick by where you want the security to live.

  1. User filters (Server menu > Create User Filter). Easy for a few users: you tick values per user or group. It does not scale to hundreds of users.
  2. A calculated field with USERNAME(), FULLNAME() or ISMEMBEROF(), used as a data source filter. This is the classic technique.
  3. Data policies on a virtual connection: row-level rules defined once on the server and enforced for every workbook that uses the connection. The recommended approach for a shared, governed setup.
  4. Database-level security with viewer credentials or impersonation: Tableau passes the user's identity to the database, which applies its own security.

The USERNAME() pattern

Create a data source filter (right-click the data source > Edit Data Source Filters) based on this calculated field:

Text
[Region Manager] = USERNAME()

or, for group-based rules:

Text
(ISMEMBEROF('Sales-West') AND [Region] = 'West')
OR ISMEMBEROF('Sales-All')

USERNAME() returns the signed-in user's account name (on Cloud this is usually the email address). ISMEMBEROF('Group') returns true if that user is in the group. In Desktop, USERNAME() returns you, so test with the Create User Filter > Impersonate (or View as User) tools.

Two rules make this secure:

  • Use a data source filter, not a normal worksheet filter. Worksheet filters can be removed by anybody who has web edit rights; data source filters cannot be bypassed in the workbook.
  • Keep the security calculation in the published data source, so that every workbook built on it inherits the protection.

An entitlement table

Typing names into calculations is fragile. The scalable pattern keeps a small entitlement table (who may see which region) and joins it to the data. The data source filter is then [Entitlements.User] = USERNAME(). Build and test that logic in SQL first:

SQL Row-level security with an entitlement table

Press Run (or Ctrl + Enter) to see the result here.

Ben sees West and North, never East. Change the user name in the query to [email protected] and re-run: only East appears. For an unknown user the join returns no rows, which is the right default, deny when unsure.

The multiplication trap

If a user is entitled to several rows for the same data row, the join duplicates it, and totals double. Test for this with a check like the one below: compare the row count and total with and without the join.

SQL Check for duplicated rows

Press Run (or Ctrl + Enter) to see the result here.

The total with the join is double. Fix it by making the entitlement table unique (SELECT DISTINCT) or by using EXISTS instead of a join. In Tableau the same duplication appears if your entitlement table has more than one row per user and region.

Putting it together in pandas

The same logic is a short script when you need to audit it: for each user, the share of rows they are allowed to see.

Python Audit what each user sees

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Other protections

  • Download permissions. A viewer who can view a chart can often also download its summary data. If the underlying rows are sensitive, deny Download Full Data and Download Summary Data.
  • Hidden fields are not secure. Hiding a field in the workbook does not stop somebody with web-edit rights from showing it. Remove sensitive columns from the data source instead.
  • Extracts hold data. An extract on the site contains every row; security is applied when queried. Use a data source filter or data policy so that the filtering is part of the published data.
  • Embedded workbooks. If you embed views in another application, the user identity must be passed (via SSO or Connected Apps), not shared in one service account. See Exporting, Subscriptions and Embedding.
  • Test with real accounts. Create a test user in each group and log in as them. Do not trust the Desktop view.

Never rely on a filter that the viewer can change as a security control. If the viewer can clear it, remove it from the view, or edit the workbook, it is a convenience, not security.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A user is in a group that Allows Download Full Data and in another group that Denies it. What is the effective result?

    Deny always wins over Allow in Tableau's permission rules.
  2. 2. Why use a data source filter and not a worksheet filter for row-level security?

    Data source filters are applied before any sheet and cannot be removed from a view.
  3. 3. What does ISMEMBEROF('Finance') return?

    ISMEMBEROF returns a Boolean for the current user and the named group.
  4. 4. Totals double after joining an entitlement table. The most likely cause?

    More than one entitlement row per data row duplicates the data row in the join.

Summary

  • Permissions decide who can open content; row-level security decides which rows they see.
  • Grant permissions to groups on projects; Deny wins; the site role is the ceiling.
  • For RLS use a data source filter based on USERNAME() or ISMEMBEROF(), an entitlement table, or data policies; keep the logic in the published data source.
  • Watch for duplicated rows and for ways viewers can change or download the data.
  • The SQL and pandas stand-ins reproduce the entitlement logic for testing.

Next: Exporting, Subscriptions and Embedding