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

How can I do the Row Level Security based upon UserID, RoleID.?

I have embedded my Power BI Report with the client's web application using the GroupID, DatasetID,ReportID.
I am getting the UserID, RoleID as the Input parameters.

How can I apply the Power BI Row level security using these input parameters.?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Rajendar_Ag ,

Based on the information you have provided, you can try to follow the following steps:

1.Define roles in Power BI Desktop before embedding the report. The roles should be based on different levels of access rights enforced by the RoleID.
vyifanwmsft_0-1716429803119.png
See the following documentation for details:
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn

 

2.You take UserID as an input parameter so that you can use dynamic RLS expressions to filter data based on UserID:

USERNAME() = [UserID]


For more information about dynamic RLS, see the following documentation:
Row-level security (RLS) in Power BI Report Server - Power BI | Microsoft Learn

 

3.When embedding a report, use the Power BI REST API to generate an embed token with a valid identifier and specify the role and user identifier.
For detailed steps on embedding paged reports with RLS, see the following documentation:
Use row-level security when embedding paginated reports with Power BI embedded analytics content - P...

 

4.After publishing the report to the Power BI service, ensure that the defined roles are mapped to the appropriate users or groups in the organisation.
vyifanwmsft_1-1716430101249.pngFor configuring role mapping see:
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn

 

Best Regards,

Ada Wang

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

1 REPLY 1
Anonymous
Not applicable

Hi @Rajendar_Ag ,

Based on the information you have provided, you can try to follow the following steps:

1.Define roles in Power BI Desktop before embedding the report. The roles should be based on different levels of access rights enforced by the RoleID.
vyifanwmsft_0-1716429803119.png
See the following documentation for details:
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn

 

2.You take UserID as an input parameter so that you can use dynamic RLS expressions to filter data based on UserID:

USERNAME() = [UserID]


For more information about dynamic RLS, see the following documentation:
Row-level security (RLS) in Power BI Report Server - Power BI | Microsoft Learn

 

3.When embedding a report, use the Power BI REST API to generate an embed token with a valid identifier and specify the role and user identifier.
For detailed steps on embedding paged reports with RLS, see the following documentation:
Use row-level security when embedding paginated reports with Power BI embedded analytics content - P...

 

4.After publishing the report to the Power BI service, ensure that the defined roles are mapped to the appropriate users or groups in the organisation.
vyifanwmsft_1-1716430101249.pngFor configuring role mapping see:
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn

 

Best Regards,

Ada Wang

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

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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 Solution Authors