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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
po
Post Prodigy
Post Prodigy

Dynamic row level security RLS not working on service but o.k. when test role in desktop

Hi,

 

Have following tables 

 

1) fact table with sales qty and  region

2) users  with user_email and role

3) role table with role and region

 

users joined to role on role column and roles joined to fact table on region.

 

When test in desktop with  User_email = USERPRINCIPALNAME() works as expected user concerned only sees that region and their sales.  have set up role called security with user_mail = USERPRINCIPALNAME()

 

When publish to service, the user sees everything.  User only has viewer access and other static RLS works against user.

 If try add the user to the role in service via datasets/security then get cannot load model when try view the report in service

 

static RLS works o.k. in service for same user for other static roles.

 

 

Any thought as to why dynamic RLS not working in service?

 

Can a user belong to both a role with dynamic RLS and static RLS - it looks to be o.k. in desktop but not in service.

 

Thanks

 

7 REPLIES 7
Pragati11
Super User
Super User

Hi @po ,

 

Are you using a security data-set with user id's and their roles; to implement Dynamic RLS in Power BI?

Check the article on Dynamic RLS here:

https://tringuyenminh92.com/index.php/2017/08/11/dynamic-rls-row-level-security-with-power-bi/

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi,

 

Thansk for reply.

 

Yes but not working on the service.

 

Thanks

Hi @po ,

 

Are you logging with your credentials in Power BI service or the user's credentials with different role on the dataset?

You can test for other user when you are using their credentials or email:

https://blog.pragmaticworks.com/how-to-test-dynamic-row-level-security-in-power-bi

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi,

 

Logged into service with that user's  credenetails and even made that user admin temporarily on workspace to check test as role and can see works when test as role but when try access report users sees all data.

 

Thanks

Hi @po ,

 

Can you attach some screenshots here on what you see in Power BI Desktop and what in Power BI Service?

In my experience if RLS works fine in Power BI Desktop then will definitely work in Power BI Service as expected.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi,

 

Screenshot below when try test with user concerned.

 

Thanks

image.png

po
Post Prodigy
Post Prodigy

Hi,

 

Finding ot works if user concerned only belongs to 1 RLS role.

 

If the same user belonngs to >1 RLS role get this error message.

 

Thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.