Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Arspantejers
Frequent Visitor

Row Level Security With Gateway Direct Query

Hi all!

 

Currently I am developing a dashboard for a small company. 

 

One of the main requirements is that RLS is applied to only show data specific to that person (so he/she will not be able to see the data of a collegue). I managed this with roles and RLS when using an Excel file as data input. The Excel table used has a column with the name of the employee. 


However, we just switched to using data from a PBI Gateway that has been set up by a third party database administrator. As a result, RLS can no longer be applied on the table that comes from this Gateway. When opening role settings in PBI Desktop it just shows the 'date dimension' table I created manually, not the table with the actual data.

 

Is there any way to work around this? I could imagine copying the table would work but then data is not really secured...

 

Thanks in advance 🙂 

10 REPLIES 10
Anonymous
Not applicable

Hi @Arspantejers Move the excel sheet to either SharePoint or OneDrive and remove the requirement of a gateway.

AbbasG
Memorable Member
Memorable Member

@Arspantejers Hi, can you share some sample data (after removing sensitive information)? It will be much easier to help you faster then.

What might help is the following:

 

I have a 'Sales' table with columns

| Customer | Product | Amount_sold | Price | Sales_person |

        a              4                 23               3                   X

        a              3                 2                 6                   Z

        b              1                 54               8                   X

        c              9                 1                 7                   Y

 

Now if person X views the dashboard, he/she should only see the rows where Sales_person = "X"

 

This is easy to achieve with RLS when I have another data source. With the gateway, however, I am unable to set any roles on my 'Sales' table

 

Hope this clarifies

Hello,
having a data source in Power BI Gateway, does not mean you are limited to Direct Query. Can you try switching it to Import mode?

Tutu_in_YYC_0-1666799939115.png

 

Hey! Thanks for the reply. 

 

In my PBI desktop I do not have the option:

 

Screenshot 2022-10-27 102136.png

At the bottom right of your Power BI Desktop, does it say what mode you are in?

Tutu_in_YYC_1-1666883930691.png

 

 

For me it's: "Storage Mode: Mixed"

Thanks, that means that some of the tables are in direct query mode and some are import mode.

Usually you will be able change the mode from direct query to import for the table. I cannot figure out why you cant do that.

Another option is to import another table that has the information for the RLS and create the role based on that table. ( make sure this new table has relationship with the main table)


@Arspantejers Hi, Let's wait for someone from the community to answer this.

Hello AbbasG, 

 

Thanks for your reply. Sadly I am unable to add any sample data as the entire dataset of the dashboard comes through the Power BI Gateway, and hence, is sensitive.. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors