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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
pfio
New Member

Testing Dynamic RLS?

Hi, 

 

I have setup dynamic RLS in PowerBI Desktop, and it works great, everything is working as expected. When I go to test entering an email using the "Now viewing as" feature online, I get errors. I can't seem to understand why the difference between the two. My understanding is that since it's dynamic, I do not have to add any users to the group online. But when I enter the email address to test, it still doesn't work. Is this expected for some reason? I am going to test with an actual user tomorrow to see if it works, but wondering if there's any other steps I need to do make the desktop version work online. 

 

Thanks for any help! 

1 ACCEPTED SOLUTION

Thanks! I figured out what the issue was....you need to set each user to have build permissions online. Worked great once I clicked that button. Glad it wasn't anything more complicated. 

View solution in original post

5 REPLIES 5
v-xiaotang
Community Support
Community Support

Hi @pfio 

Within Power BI Desktop, username() will return a user in the format of DOMAIN\User and userprincipalname() will return a user in the format of user@contoso.com.

Within the Power BI service, username() and userprincipalname() will both return the user's User Principal Name (UPN). This looks similar to an email address.

https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls

 

Based on your description, you may need to assign role to users to apply RLS filter, otherwise they will got this can't load data error.
Besides, current RLS only works on read permission, so admin and dataset owner can see each records even if they not get RLS roles.

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Thanks! I figured out what the issue was....you need to set each user to have build permissions online. Worked great once I clicked that button. Glad it wasn't anything more complicated. 

thanks for your reply @pfio 

Glad to hear that! 

could you kindly accept your answer helpful as the solution. so the others can find it more quickly.
really appreciate!

 

Regards,

Community Support Team _Tang

pfio
New Member

Thanks Denis! 

 

The error is "Couldn't Load Data for this Visual" 

 

I used USERPRINCIPALNAME() for the RLS. 

selimovd
Super User
Super User

Hey @pfio ,

 

what does the error say?

Did you use the USERNAME() or USERPRINCIPALNAME() function for the RLS?

 
Best regards
Denis
 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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

Top Solution Authors