Table of Contents

What is Data Security?

Data Security Visual Abstract


Published datasets can be configured with Data Security using Row-Level Security (RLS) (for Tables) or Object-Level Security (OLS) (for Tables & Columns). The purpose of Data Security is to ensure users only see and use data they are permitted to, both in published reports and when making their own, self-service data solutions. To do this, users are assigned to Roles which have RLS or OLS rules configured, which filter (RLS) or restrict (OLS) queries generated by reports & client tools like Power BI Desktop or Excel.

While not obligatory, Data Security is a common feature of a robust, secure & compliant enterprise BI solution. This series is a functional introduction to Data Security, as it pertains to tabular modeling & Tabular Editor.

Both RLS & OLS can be easily configured, modified and tested from within Tabular Editor.


WHY CONFIGURE ROW- OR OBJECT-LEVEL SECURITY?
Configuring RLS or OLS can be benificial for your model & reporting:
  • Reduce risk and improve governance by ensuring users only see data they have access to.
  • Configure dynamic RLS with central role tables for consistency and lightweight maintenance.
  • Have granular control over what data and objects can be queried.

  • How Does it Work?

    Data Security works at the level of the model. It is configured following the below steps:

    1. Create Roles:

    Roles are groups of users who have the same permission / data security logic. Users in this case are identified by their email, or the email of an Azure AD Security Group. Examples of roles:

    • Users in the same region, team or department (EMEA, UA Sales Team).
    • Users with the same role, function or access clearance (Key Account Managers, SC Clearance).
    • Groups defined by other business logic or arbitrary rules (Externals, Build Users).
    Data Security Create Role
    Figure 1: In Tabular Editor, Roles are one of the top-level object types (like Tables, Relationships, etc).
    Important

    After creating a new Role in Tabular Editor, you must first set the Model Permission property to Read.

    2. Specify Rules:

    Rules are applied for each role to one or more objects, depending on the security type:

    • RLS Table Permissions: DAX table expressions -- return each row evaluating True. These permissions traverse relationships; the design of the model is imperative to good RLS rules.
    Data Security Create Role
    Figure 2: In Tabular Editor, Table Permissions for RLS are visible under the role. New table permissions can be created by right-clicking a Role and selecting 'Add Table Partition...'
    Data Security Create Role
    Figure 3: Table Permission DAX is visible in the Expression Editor when selecting a Table Permission.
    • OLS Object Permissions: These permissions apply to the primary objects as well as all downstream dependents.
      • Read (Can see / query)
      • None (Cannot see / query)
      • Default (No policy configured; equivalent to Read)
    Data Security Create Role
    Figure 4: In Tabular Editor, object permissions are accessible in the 'Properties' window, under the 'Translations, Perspectives, Security' heading.

    3. Assign Users to Roles:

    Once configured in the dataset, users must be added to their respective roles.

    You can assign and remove users/groups from roles through Tabular Editor the following way:

    1. Right-Click the Role, select Edit members...
    Data Security Create Role
    Figure 7:Users can be assigned to roles by right-clicking a Role and selecting 'Edit members...'.
    1. Click the dropdown button on the 'Add Windows AD Member' button and choose Azure AD Member:
    Data Security Create Role
    Figure 8: For AAS/SSAS models, users can be added via the 'Edit members...' dialog box.
    1. Specify the Azure AD user identity (typically, the user e-mail address) as the Member Name property.
    2. Click OK.
    3. Save the model.
    Important

    If your organisation is using on-premises Active Directory with SQL Server Analysis Services, you will need to use the Windows AD Member option instead of Azure AD Member.

    Note

    It is recommended to manage Data Security and Access with Azure Active Directory Groups.
    Using this approach is preferred you can centralize management of security & user segmentation.

    4. Provision Users Access to the Dataset:

    Power BI: Users must be given dataset access according to the usage scenario.

    • App Audience: Users / their Azure AD Groups are added to the appropriate App Audience.
    • Workspace Viewer: Users / their Azure AD Groups are added as Workspace Viewers
    • Dataset Readers: Users / their Azure AD Groups are given Dataset-specific permissions via a Dataset or dependent item (i.e. Report).
    Warning

    Users given Admin, Member or Contributor Workspace Roles have write permissions to a dataset. As such, Data Security like RLS and OLS will not filter or block data for users with these roles.

    If a user is an Admin, Member or Contributor, they will be able to see all the data.

    As much as is reasonable, try to distribute and manage permissions via Power BI Apps.

    5. Validating Security:

    RLS and OLS can only be tested with impersonation once user groups have been added & granted access. Validate security via:

    Data Security Create Role
    Figure 5: The easiest way to test Data Security is via Impersonation with Tabular Editor. The 'Impersonation' option is possible from any data querying feature (DAX Queries, Pivot Grid, Preview Data).
    Note

    To validate data security with impersonation, the below factors must be all true:

    • The user must be assigned a role.
    • The user must have read permissions to the dataset.
    • The user must have build permissions to the dataset.
    Data Security Create Role
    Figure 6: A demonstration of RLS testing in Tabular Editor using impersonation. Shown is testing with (A) Data Preview, (B) DAX Queries and (C) Pivot Grid.
    Important

    Testing Data Security with Impersonation using Tabular Editor 3 is limited to dataset hosted in the Power BI Datasets service. TE3 Desktop Licenses cannot benefit from this feature. This is because roles are assigned in the Power BI Service.


    How Does it Look?

    Depending on how you have designed and configured Data Security, the experience may differ for users. Below are common examples for common scenarios of RLS and/or OLS implementation in a dataset

    Click a tab to see the example and get an explanation of each:


    Without security, everyone with access to the dataset can see all the data.

    The only restriction is whether they have access to the reports / datasets.

    No security

    In the example, both Jack & Janet can see all of the data.


    Hard Limitations

    Some reporting or data modeling features will not work with RLS or OLS configuration. Examples are:

    1. RLS Limitations

    2. OLS Limitations

      • Combining separate RLS roles & OLS roles (discussed above)
      • Q&A features
      • Quick Insights
      • Smart Narrative
      • Excel Data Types gallery

    Further Reading & References

    For additional, detailed reading about Data Security, see the below references:

    1. Power BI Security Whitepaper
    2. Power BI Docs - Security
    3. Analysis Services Docs - Object-Level Security
    4. Power BI Implementation Planning - Security
    5. (Related) Power BI Implementation Planning - Information Protection & Data Loss Prevention (DLP)