Forum Discussion
Power BI Button
- 2 months ago
Then, the answer us use RLS. Here's the approach :
1) Create a security table in your model
A table listing who is allowed to see the table:AllowedUsers = DATATABLE("UserEmail", STRING, {
{"[email protected]"},
})
2) Define an RLS role
In Power BI Desktop → Modeling → Manage Roles:
[UserEmail] = USERPRINCIPALNAME()
Applied on the AllowedUsers table.
3) Connect AllowedUsers to your fact/data table
Create a relationship between AllowedUsers and the table that feeds the visual the bookmark reveals. RLS will filter it to empty for users not in the list.
Remember that The button hide is UX. The RLS is the actual enforcement. You need both, one for experience, one for security. RLS alone is sufficient if you don't care about hiding the button.
Hope this helps! Don't forget to accept as solution and give likes in order to keep helping others.
Best regards,
Oussama (Data Consultant - Expert Fabric & Power BI)
- 2 months ago
This called as Object Level Security, you can achieve this by Tabular Editor.
You can refer to this sources:
https://www.youtube.com/watch?v=K06naPH0LfQ
https://www.phdata.io/blog/how-to-implement-object-level-security-in-power-bi/
If this solved your issue, please mark it as the accepted solution. ✅
Unauthorized Users should not be able to see that table.
Then, the answer us use RLS. Here's the approach :
1) Create a security table in your model
A table listing who is allowed to see the table:
AllowedUsers = DATATABLE("UserEmail", STRING, {
{"[email protected]"},
})
2) Define an RLS role
In Power BI Desktop → Modeling → Manage Roles:
[UserEmail] = USERPRINCIPALNAME()
Applied on the AllowedUsers table.
3) Connect AllowedUsers to your fact/data table
Create a relationship between AllowedUsers and the table that feeds the visual the bookmark reveals. RLS will filter it to empty for users not in the list.
Remember that The button hide is UX. The RLS is the actual enforcement. You need both, one for experience, one for security. RLS alone is sufficient if you don't care about hiding the button.
Hope this helps! Don't forget to accept as solution and give likes in order to keep helping others.
Best regards,
Oussama (Data Consultant - Expert Fabric & Power BI)