Forum Discussion
RLS in Power BI report with Direct Query to Azure SQL Database
- 1 year ago
Hi rohitb24 ,
Thank you for sharing this.
It’s not because the user has read access on the database — RLS is still applied when queries flow through Power BI, provided you publish the dataset and assign users to the role in Power BI Service.
Steps to follow
Ensure your DAX filter uses USERPRINCIPALNAME() or a similar mapping column.
After publishing, assign users to that role under dataset Security in Power BI Service.
Test using “View as role” or “Test as role” in the service.
That way, RLS will work even in DirectQuery mode.
Hope this clears it up 🙌. If this helps, please give a Kudos 👍 and mark as Accepted Solution ✅.
Thanks
Shashi Paul
Hi rohitb24 ,
Thank you for sharing this.
It’s not because the user has read access on the database — RLS is still applied when queries flow through Power BI, provided you publish the dataset and assign users to the role in Power BI Service.
Steps to follow
Ensure your DAX filter uses USERPRINCIPALNAME() or a similar mapping column.
After publishing, assign users to that role under dataset Security in Power BI Service.
Test using “View as role” or “Test as role” in the service.
That way, RLS will work even in DirectQuery mode.
Hope this clears it up 🙌. If this helps, please give a Kudos 👍 and mark as Accepted Solution ✅.
Thanks
Shashi Paul