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
AnttiKoskinen
Frequent Visitor

Is there a way to show user his/her active RLS on a Power BI report when using PBI Service datasets?

I have not found a solution to do this and I'm wondering whether it is possible without creating a separate table elsewhere which includes all row level security details per user. Is there a way to access the security details I've added in PBI Service?

 

How have you solved this?

1 ACCEPTED SOLUTION

Hi, @AnttiKoskinen 

Thanks for your quick response! Soory for that i may misunderstand your need.

If you want to see the current user's attributes on the report page, you can use the USERNAME() function to place it in the card image for display.

 

If you want to get the RLS name and roles you configured in the current dataset. As searched, There is no Power BI REST API endpoint for this unfortunately.

To expand on that, you can connect to the XMLA endpoint using SSMS and run some queries by MDX query. There are pros and cons. In case you want more info, here is some doco with examples:

Dynamic Management Views (DMVs) in Analysis Services | Microsoft Learn

 

Using the DMVs you can get roles, members, and the role filters per table, however only one view can be queried at a time with no joins allowed. I ended up building up data from the following DMVs:

$SYSTEM.TMSCHEMA_ROLES
$SYSTEM.TMSCHEMA_ROLE_MEMBERSHIPS
$SYSTEM.TMSCHEMA_TABLES
$SYSTEM.TMSCHEMA_TABLE_PERMISSIONS

vyueyunzhmsft_1-1688113421412.png

 

 

For how to connect to the workspace you can refer to :
Dataset connectivity and management with the XMLA endpoint in Power BI - Power BI | Microsoft Learn

 

And for more information , you can refer to this:
Solved: REST API to get role names (RLS) from power bi se... - Microsoft Fabric Community

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

 

 

View solution in original post

3 REPLIES 3
v-yueyunzh-msft
Community Support
Community Support

Hi, @AnttiKoskinen 

According to your description, do you mean you want to  show user his/her active RLS on a Power BI report ?

You can show the user his/her active RLS on a Power BI report when using PBI Service datasets. You can use the "View As Roles" feature in PBI Service or "View as" In Desktop to see the data as a specific user and check if the RLS is working as expected.

For this , you can refer to :
Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

How To Test RLS in Power BI Service - AzureOps

 

You can also access the security details you've added in PBI Service. You can add members (user or security group) to the Role you created in Power BI Desktop in PBI Service.

Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

 

If you want to configure the dynamic RLS , you actually need to add a table to manage the right. For this , you can refer to :
Dynamic Row Level Security with Power BI Made Simple - RADACAD

Power BI Row Level Security and Dynamic RLS | by David Ding | Analytics Vidhya | Medium

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

Thanks for reply and all this is good and already in use.

 

My need is to show user what his/her RLS attribute values are (those that I've inputed into the dataset). Is there any way to access the information so that it could be used in reporting?

Hi, @AnttiKoskinen 

Thanks for your quick response! Soory for that i may misunderstand your need.

If you want to see the current user's attributes on the report page, you can use the USERNAME() function to place it in the card image for display.

 

If you want to get the RLS name and roles you configured in the current dataset. As searched, There is no Power BI REST API endpoint for this unfortunately.

To expand on that, you can connect to the XMLA endpoint using SSMS and run some queries by MDX query. There are pros and cons. In case you want more info, here is some doco with examples:

Dynamic Management Views (DMVs) in Analysis Services | Microsoft Learn

 

Using the DMVs you can get roles, members, and the role filters per table, however only one view can be queried at a time with no joins allowed. I ended up building up data from the following DMVs:

$SYSTEM.TMSCHEMA_ROLES
$SYSTEM.TMSCHEMA_ROLE_MEMBERSHIPS
$SYSTEM.TMSCHEMA_TABLES
$SYSTEM.TMSCHEMA_TABLE_PERMISSIONS

vyueyunzhmsft_1-1688113421412.png

 

 

For how to connect to the workspace you can refer to :
Dataset connectivity and management with the XMLA endpoint in Power BI - Power BI | Microsoft Learn

 

And for more information , you can refer to this:
Solved: REST API to get role names (RLS) from power bi se... - Microsoft Fabric Community

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

 

 

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.