Forum Discussion

rohitb24's avatar
rohitb24
New Member
1 year ago
Solved

RLS in Power BI report with Direct Query to Azure SQL Database

I have the below table in Az SQL database :   Employee table EmployeeId, FullName, EmailId,""""""""""   And I am accessing the above table from the Az SQL database in the report via direct query...
  • shashiPaul1570_'s avatar
    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