Forum Discussion
Power BI Button
Hi,
I have a button in power BI that button opens a table on same page through bookmark, I want only specific users to see that Button and only those specific users should be able to click it.
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)
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. ✅
6 Replies
- v-pnaroju-msftCommunity Support
Thankyou, oussamahaimoud and anilelmastasi for your responses.
Hi PrasadSwamy007,
We appreciate your inquiry through the Microsoft Fabric Community Forum.
We would like to inquire whether have you got the chance to check the solutions provided by oussamahaimoud and anilelmastasi to resolve the issue. We hope the information provided helps to clear the query. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.
Thank you. - anilelmastasiSuper User
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. ✅
- oussamahaimoudMemorable Member
Since the button reveals a table on the same page via bookmark, the real question is: should unauthorized users see that table's data?
If your goal is security, RLS is the answer. If your goal is clean UX, the visibility measure is the best available option, but treat it as cosmetic only.
- PrasadSwamy007Regular Visitor
Unauthorized Users should not be able to see that table.
- oussamahaimoudMemorable Member
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)
- v-pnaroju-msftCommunity Support
Hi PrasadSwamy007,
We are following up to see if what we shared solved your issue. If you need more support, please reach out to the Microsoft Fabric community.
Thank you.