---
schema_version: "1"
id: 6ecebc05509b65b65c722c8af59460c91b6a74888c6d5d136b2cd2f89fc0d7c2
title: Overview of Row-Level Security Options in Tableau
collection: tableau
version: next
locale: en-gb
portal_url: https://docs.salesforce.com/tableau/next/en-gb/server/rls_options_overview.md
canonical_url: https://help.tableau.com/v0.0/server/en-gb/rls_options_overview.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 16e716358840ff0fa7ab70b7813c00b54ba6c09ee94a8d780a3e7e81f517f79e
description: Overview and comparison of row-level security options in Tableau.
---
[Skip to main content](#main-content)

# Overview of Row-Level Security Options in Tableau

Sometimes, you want to filter data based on the user that is requesting it. For example:

- You want regional salespeople to see sales figures only for their region.
- You want sales managers to see statistics only for salespeople that report to them.
- You want students to see visualisations based only on their own test scores.

An approach to filtering data this way is called row-level security (RLS). There are multiple methods to accomplish row-level security both inside and outside of Tableau, each with its own pros and cons.

## Create a user filter and map users to values manually

The simplest way to achieve row-level security in Tableau is through a user filter where you manually map users to values. For example, you could manually map a user named “Alice” to the value “East” so that she only sees rows in the data source where the “Region” column is “East”.

This method is convenient but high maintenance, and attention must be paid to security. It must be done per-workbook, and you must update the filter and republish the data source as your user base changes. When you publish an asset with this type of user filter, you need to set permissions so that users cannot save or download it and remove the filter, thereby gaining access to all of the data.

For more information, see [Create a user filter and map users to values manually](https://help.tableau.com/current/pro/desktop/en-gb/publish_userfilters_create.htm#create-user-filter) in the Tableau Desktop and Web Authoring help.

## Create a dynamic user filter using a security field in the data

Using this method, you create a calculated field that automates the process of mapping users to data values. This method requires that the underlying data include the security information you want to use for filtering. For example, using a calculated field, the USERNAME() function and a “Manager” column in the data source, you could determine if the user requesting the view is a manager and adjust the data in the view accordingly.

Because filtering is defined at the data level and automated by the calculated field, this method is less error prone than mapping users to data values manually. When you publish an asset with this type of user filter, you need to set permissions so that users cannot save or download it and remove the filter, thereby gaining access to all of the data.

For more information, see [Create a dynamic filter using a security field in the data](https://help.tableau.com/current/pro/desktop/en-gb/publish_userfilters_create.htm#dynamic) in the Tableau Desktop and Web Authoring help.

## Use a data policy

Starting in Tableau 2021.4, when Data Management is enabled in Tableau Server or Tableau Cloud, users with a Creator licence can implement row-level security through data policies on virtual connections. Because virtual connections are centralised and reusable, you can manage row-level security for each connection in one place, safely and securely, across all content that uses that connection.

Unlike the above solutions for row-level security in Tableau, this method doesn't carry the same risk of exposing information if an author neglects to properly secure permissions on the workbook or data source, because the policy is enforced on the server for every query.

Row-level security through virtual connection data policies was developed to address shortcomings of other row-level security solutions. We recommend this solution in most situations where it's an option.

For more information on row-level security using data policies on virtual connections, see [About Virtual Connections and Data Policies](https://help.tableau.com/v0.0/server/en-gb/dm_vconn_overview.htm).

## Use existing RLS in the database

Many data sources have mechanisms for RLS built in. If your organisation has already put effort into building row-level security in a data source, you may be able to take advantage of your existing RLS.

It is not necessarily easier or better to implement a built-in RLS model vs building it with Tableau in mind; these techniques are generally leveraged when an organisation has already invested in these technologies and they want to take advantage of that investment, or when they need to apply the same security policies to other database clients in addition to Tableau.

The main benefit of using built-in RLS is that administrators can implement and control their data security policy in one place: their databases.

For more information, see [Row-Level Security in the Database](https://help.tableau.com/v0.0/server/en-gb/rls_datasource.htm).

## Row-level security option comparison

<table style="width: 100%;mc-table-style: url('Resources/TableStyles/Basic-Border.css');" class="TableStyle-Basic-Border" cellspacing="0"><colgroup><col class="TableStyle-Basic-Border-Column-Column1" style="width: 16%;"><col class="TableStyle-Basic-Border-Column-Column1" style="width: 28%;"><col class="TableStyle-Basic-Border-Column-Column1" style="width: 28%;"><col class="TableStyle-Basic-Border-Column-Column1" style="width: 28%;"></colgroup><tbody><tr class="TableStyle-Basic-Border-Body-Body1"><th class="TableStyle-Basic-Border-BodyE-Column1-Body1">RLS option</th><th class="TableStyle-Basic-Border-BodyE-Column1-Body1">Useful when</th><th class="TableStyle-Basic-Border-BodyE-Column1-Body1">Pros</th><th class="TableStyle-Basic-Border-BodyD-Column1-Body1">Cons</th></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">Manual user filter</td><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><ul><li>You are doing a proof of concept or testing user filtering functionality</li><li>You are creating a static workbook to use with an unchanging group of users</li><li>You understand the data security risk of having the permissions set incorrectly</li></ul></td><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><ul><li>Simple at small scales</li><li>Easy to understand mapping</li><li>Good for testing</li></ul></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1"><ul><li>High-maintenance</li><li>Need to update filter and republish as user base changes</li><li>Permissions must be secured to prevent users from seeing unfiltered data</li><li>Must be replicated in every workbook</li></ul></td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">Dynamic user filter</td><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><ul><li>You don't have a <span class="mc-variable Variables.DM_sku variable">Data Management</span> licence</li><li>The data contains information you can use to filter it</li><li>You understand the data security risk of having the permissions set incorrectly</li></ul></td><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><ul><li>Relatively easy to set up</li></ul></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1"><ul><li>Permissions must be secured to prevent users from seeing unfiltered data</li><li>Must be replicated in every workbook or data source</li></ul></td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">Data policy</td><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><ul><li>You have a <span class="mc-variable Variables.DM_sku variable">Data Management</span> licence</li><li>The data contains information you can use to filter it</li><li>Ease of data security is a significant concern</li></ul></td><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><ul><li>Centralised</li><li>Secure</li><li>Low-maintenance</li><li>Responsibilities for security and analytics can be separated</li></ul></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1"><ul><li><span class="mc-variable Variables.DM_sku variable">Data Management</span> licence required</li></ul></td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyB-Column1-Body1">RLS in the database</td><td class="TableStyle-Basic-Border-BodyB-Column1-Body1"><ul><li>Your database has an existing RLS security built into the database</li><li>You’re not using extracts</li></ul></td><td class="TableStyle-Basic-Border-BodyB-Column1-Body1"><ul><li>Might already be built into your organisation’s database</li><li>Policies can be applied to database clients other than Tableau</li></ul></td><td class="TableStyle-Basic-Border-BodyA-Column1-Body1"><ul><li>Must use live queries</li><li>Might have limitations or requirements. Your IT team can identify them</li></ul></td></tr></tbody></table>

## Which row-level security option should I use?

<table style="width: 100%;"><colgroup><col style="width: 45%;"><col style="width: 10%;"><col style="width: 45%;"></colgroup><tbody><tr><td style="padding-left: 6px;padding-right: 6px;padding-top: 6px;padding-bottom: 6px;background-color: #f5f5f5;">Does your organisation have a preferred RLS solution in the database that works for this project?</td><td style="text-align: center;">→ Yes →</td><td style="padding-left: 6px;padding-right: 6px;padding-top: 6px;padding-bottom: 6px;background-color: #f5f5f5;">See <a href="https://help.tableau.com/v0.0/server/en-gb/rls_datasource.htm" class="xref">Row-Level Security in the Database</a></td></tr><tr><td><p style="text-align: center;">↓ No ↓<br></p></td><td style="text-align: center;">&nbsp;</td><td>&nbsp;</td></tr><tr><td style="padding-left: 6px;padding-right: 6px;padding-top: 6px;padding-bottom: 6px;background-color: #f5f5f5;"><p>Do you have a <span class="mc-variable Variables.DM_sku variable">Data Management</span> licence?</p></td><td style="text-align: center;">→ Yes →</td><td style="padding-left: 6px;padding-right: 6px;padding-top: 6px;padding-bottom: 6px;background-color: #f5f5f5;">See <a href="https://help.tableau.com/v0.0/server/en-gb/dm_vconn_overview.htm" class="xref">About Virtual Connections and Data Policies</a></td></tr><tr><td><p style="text-align: center;">↓ No ↓</p></td><td style="text-align: center;">&nbsp;</td><td>&nbsp;</td></tr><tr><td style="background-color: #f5f5f5;">Is this a proof of concept, a basic user filter test or a static workbook with unchanging users?</td><td style="text-align: center;">→ Yes →</td><td style="background-color: #f5f5f5;">See <a href="https://help.tableau.com/current/pro/desktop/en-gb/publish_userfilters_create.htm#create-user-filter" target="_blank">Use a manual user filter</a></td></tr><tr><td><p style="text-align: center;">↓ No ↓</p></td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td style="background-color: #f5f5f5;"><p>See <a href="https://help.tableau.com/current/pro/desktop/en-gb/publish_userfilters_create.htm#dynamic" target="_blank">Use a dynamic user filter</a></p></td><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table>