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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

Row Level Security w/SecurityTable

Hello Power BI Masters! 

 

I have a question about Power BI RLS. I am struggling to find a working solution to provide security around our data using RLS in the Service. Currently, we use Power BI Desktop, on-premise. We have our security setup through sql views. First our ETL dump the data into our DW. Then, I create access layer DataMarts. Within the datamarts is where I implement our security. I use sql views to join and dim tables to my fact tables. The way we restrict user data, is I have a security table that is setup as follows:

 

Capture.PNG

 

The entity is the name of the DataMart I have setup. The rest is self explanatory. 

 

Also in the views, I join to this table for each of these values. Works perfectly for on-prem. I'm struggling to get it working in the cloud. Could I still use this model in the cloud? Or will I have to make my data model a little more complex for use in the cloud?

 

Let me know if I need to provide additional data and information. 

 

Thanks!  

 

 

 

2 REPLIES 2
Anonymous
Not applicable

Anyone? lol 

How does the condition in your RLS role look like?
I assume you use the USERNAME() function.
Try creating 2 measures with like "username = USERNAME()" and "up = USERPRINCIPLENAME()".
See what these measures return in power BI Desktop and in the cloud.
I guess u need to add a column "userprinciplename" to your security table and use the email address instead. then update the role to use the new column and userprinciplename () function. This may not work in power bi desktop depending on your alternative upn settings of your local AD account.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.