Forum Discussion
Access to user through DB table
Hi all,
i have to set up a solution that allows me to manage access to a report only to some users that i've put in specific SQL table.
I can't set up a RLS because i have to give an administration account to the customer and he could modfiy everything. And adminisrtators are not subject to a RLS.
So, to be clear, if a user that are in the sql table the report works normally, if not the report should be blank..
Any ideas?
Regards,
Francesco
3 Replies
- Tahreem24
Super User
Please refer the below link for RLS with User table in SQL.
- FrancescoSCP
Helper IV
That's not what i want....
I've created a table in SQL Server (USERS) with some users. In Power BI i created some measures:
Username = USERNAME()
Users = CONCATENATEX(VALUES(USERS[User]; USERS[User]; ", ")
Check = IF([Username] IN {[Users]}; 1; 0)
Now i've put the Check measure as a filter in a visual with value of 1. It seems to work good.
The problem is that i have many visuals with many filters and i have to add it to each one. That's beacuse i can't use a page/report level filter with a measure and can't create a column with the USERNAME() function.
Any ideas?
Francesco- Tahreem24
Super User
You have to put USERNAME() DAX in Manage Role option.
Use the below link:
https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple
https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls