Forum Discussion

PrasadSwamy007's avatar
PrasadSwamy007
Regular Visitor
2 months ago
Solved

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.
  • oussamahaimoud's avatar
    oussamahaimoud
    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]"},

        {"[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)