Forum Discussion
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.?
- Anonymous2 years ago
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.
See the following documentation for details:
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn2.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 Learn3.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 - Power BI | Microsoft Learn4.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.
For configuring role mapping see:
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft LearnBest Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot 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.
See the following documentation for details:
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn2.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 Learn3.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 - Power BI | Microsoft Learn4.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.
For configuring role mapping see:
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft LearnBest Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.