Forum Discussion

PrasadSwamy007's avatar
PrasadSwamy007
Regular Visitor
3 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
    3 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)

6 Replies

  • 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.

  • 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.

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

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

  • 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.