Forum Discussion
Help with paginated report RLS in embedded solution
- 1 year ago
Hey Erkko,
You’re on the right track – paginated RLS works differently than normal PBIX reports. A few key things to check:
Use @UserID or =User!UserID / =User!CustomData inside your dataset queries or filters. For embedded, only CustomData() works, so make sure you pass the correct value in the embed token.
Set up the filter at dataset level (SQL or SSAS query) – paginated reports don’t use Power BI model RLS.
Verify the embed token actually carries CustomData (you can test by showing it in a textbox with =User!CustomData).
Avoid relying on security groups – for paginated, the row filtering must happen through the query logic tied to that CustomData.
Debug step: First hardcode a value in your dataset query to confirm data comes through, then swap in =User!CustomData.
This way, each customer’s data is filtered correctly when you embed the report.
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
Hey Erkko,
You’re on the right track – paginated RLS works differently than normal PBIX reports. A few key things to check:
Use @UserID or =User!UserID / =User!CustomData inside your dataset queries or filters. For embedded, only CustomData() works, so make sure you pass the correct value in the embed token.
Set up the filter at dataset level (SQL or SSAS query) – paginated reports don’t use Power BI model RLS.
Verify the embed token actually carries CustomData (you can test by showing it in a textbox with =User!CustomData).
Avoid relying on security groups – for paginated, the row filtering must happen through the query logic tied to that CustomData.
Debug step: First hardcode a value in your dataset query to confirm data comes through, then swap in =User!CustomData.
This way, each customer’s data is filtered correctly when you embed the report.
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
Hi!
We got it working using your instructions but we started to test it further. We got it working also using only role in the datamodel. We have a role named "Example" using Table1[Username] = USERNAME() in Power BI. We pass from the code the UI Username value to the role and it filters data also automatically. Is this also a correct and secure way to do this?
Thanks for the help!
- Erkko11 months agoFrequent Visitor
Hi!
We got it working using your instructions but we started to test it further. We got it working also using only role in the datamodel. We have a role named "Example" using Table1[Username] = USERNAME() in Power BI. We pass from the code the UI Username value to the role and it filters data also automatically. Is this also a correct and secure way to do this?
Thanks for the help!