Forum Discussion

gouthamct1994's avatar
gouthamct1994
New Member
1 year ago
Solved

Hide Button with RBAC

Hello,

 

I have a Button, which, when clicked, will display a table that is otherwise hidden. Now, that button is visible to everyone who accesses the report. I have created a table with Display name, Position (Managers/Officer), and User Principal name (Email Address).

If the Manager logs into the report, they should see the button and be able to use it. If an Officer logs in to the report, the button should be hidden and disabled, so they cannot use it.

 

How can I achieve it with Role base access control??

 

Thanks

  • Hi gouthamct1994 

     

    What you're trying to do here is similar to visual-level security, which is currently not available in Power BI. However, it's actually a great idea and should be submitted to Fabric Ideas.

     

    If your concern is about users seeing a blank table—such as when an officer clicks a button and then complains about it—you might consider adding a disclaimer or message. If you haven't tried this already, you can display a warning or alert indicating that they are not authorized to access that content when they click on the button.

    In the example below, you'll see that when an officer clicks the button, a warning message is shown. But when a manager clicks the "Show Table" button, no warning appears.

     

     

    I’ve attached a simple sample PBIX file so you or anyone else can try it out.

6 Replies

  • Hi gouthamct1994 

     

    What you're trying to do here is similar to visual-level security, which is currently not available in Power BI. However, it's actually a great idea and should be submitted to Fabric Ideas.

     

    If your concern is about users seeing a blank table—such as when an officer clicks a button and then complains about it—you might consider adding a disclaimer or message. If you haven't tried this already, you can display a warning or alert indicating that they are not authorized to access that content when they click on the button.

    In the example below, you'll see that when an officer clicks the button, a warning message is shown. But when a manager clicks the "Show Table" button, no warning appears.

     

     

    I’ve attached a simple sample PBIX file so you or anyone else can try it out.

  • gouthamct1994 , As of now the action can not be dynamic for Bookmark. But it can be there for page. So you can disable page button base on login 

     

    Once you enable action as page navigation, use fx and add a measure like 

     

    = if(userprincipalname() = "[email protected]", "Page1", blank()) 

     

    • gouthamct1994's avatar
      gouthamct1994
      New Member

      To the button, I have already tagged a Bookmark. I want a solution that hides or disable this button based on Role base access control

  • v-lgarikapat's avatar
    v-lgarikapat
    Community Support

    Hi gouthamct1994 ,

    Thanks for reaching out to the Microsoft fabric community forum.

     

    kushanNa , amitchandak ,

    Thanks for your prompt response

    gouthamct1994 ,

    I wanted to follow up and confirm whether you’ve had the opportunity to review the information   provided kushanNa  , amitchandak  . If you have any questions or need further clarification, please don’t hesitate to reach out.

     

    Looking forward to your response.

    Best regards,
    Lakshmi.

    • v-lgarikapat's avatar
      v-lgarikapat
      Community Support

      Hi gouthamct1994 ,

      We’d like to confirm whether your issue has been successfully resolved. If you still have any questions or need further assistance, please don’t hesitate to reach out. We’re more than happy to continue supporting you.

       

      Best Regards,

      Lakshmi

      • v-lgarikapat's avatar
        v-lgarikapat
        Community Support

        Hi gouthamct1994 ,

         

        We’d like to confirm whether your issue has been successfully resolved. If you still have any questions or need further assistance, please don’t hesitate to reach out. We’re more than happy to continue supporting you.

         

        Best Regards,

        Lakshmi