Forum Discussion

ribisht's avatar
ribisht
Helper I
1 year ago
Solved

Table Level Security

 
I need assistance with one of the use cases. I have a tabular visual comprising 30 columns sourced from three different tables: a, b, and c. I created a role for a user who does not have access to table b. However, when this user views the report, the entire visual fails and displays an error message stating that they do not have access to the columns in table b. How can this issue be resolved?

Solution required: When the user views the report, he should see the visual, but the columns from the B table should show null or blank values in the visual using Power BI. 
  • HI ribisht,Thanks for the clarification!  


    Giving users direct access to the Google Sheet would defeat the purpose of security. In Power BI, if a user cannot access the data source, the visual fails because the dataset cannot be loaded.

    Connect the Google Sheet to Power BI using a service account that has access to the sheet, so the data loads centrally and not based on individual user permissions. Then apply Row-Level Security (RLS) and use conditional DAX measures to show blank values for columns from Table B for users without access. This way, users will see the full visual with restricted data showing as blank, without exposing the actual Google Sheet or its contents.

     

    Glad I could assist! If this answer helped resolve your issue, please mark it as Accept as Solution and give us Kudos to guide others facing the same concern.

     

    Thank you.

11 Replies

  • Create a copy of the report page and remove the columns from table b.

  • We don't want to remove the column there instead, it should show blank for the users who do not have access to the table

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

    Hi ribisht ,

     

    In Power BI, when you apply Table-Level Security (TLS) and restrict access to a table (e.g., Table B), any visual referencing that table will not display for users without access—this is standard behavior, as Power BI blocks access at the object level. To address the requirement of displaying the full visual with columns from Table B appearing as blank/null for restricted users, you can implement a custom solution using a user access table and conditional DAX measures:
    To resolve the issue we need to create a UserAccess table mapping each user to a flag indicating whether they have access to Table B. For each column from Table B in the visual, create a DAX measure that conditionally returns the value only if the user has access, like this:
    TableB_Column1_Display =
    IF (
    LOOKUPVALUE(UserAccess[HasAccessToTableB], UserAccess[UserPrincipalName], USERPRINCIPALNAME()) = TRUE,
    SELECTEDVALUE(TableB[Column1]),
    BLANK()
    )

     

    Replace the Table B columns in your visual with these DAX measures. Finally, apply Row-Level Security (RLS) on the UserAccess table to filter data based on the logged-in user:
    UserAccess[UserPrincipalName] = USERPRINCIPALNAME()

     

    This ensures that users without access to Table B see blank values, while those with access can view the data.

     

    If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!

     

    Thank you for using Microsoft Fabric Community Forum.

    • ribisht's avatar
      ribisht
      Helper I

      Thanks for your detailed answer however, it says Caller does not have permission.not resolved 

    • ribisht's avatar
      ribisht
      Helper I

      When I say "don't have access," I’m referring to the user being unable to access the Google Sheet that serves as the data source.

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

    Hi ribisht,

    Thank you for the clarification!

     

    The "Caller does not have permission" error is occurring because the user does not have access to the Google Sheet that serves as the data source. Without access to the source data, Power BI cannot retrieve any data, which causes the permission error.

    To resolve this, please ensure that the user has the proper access to the Google Sheet itself. Once the user has access to the data source, you can implement the solution I suggested earlier, using DAX measures and Row-Level Security (RLS) to conditionally show blank values for columns from Table B for users who do not have access. This will allow the visual to display with blank values for the restricted columns while still showing the rest of the data as expected. 

     

    Please Accept as solution if this meets your needs and a Kudos would be appreciated.

     

    Thank you.

    • ribisht's avatar
      ribisht
      Helper I

      Thanks v-sgandrathi   a lot for your reply but if I give him the access to the google sheet then what will be the use of security 🙂 , he will see everything which he is not supposed to see

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

        HI ribisht,Thanks for the clarification!  


        Giving users direct access to the Google Sheet would defeat the purpose of security. In Power BI, if a user cannot access the data source, the visual fails because the dataset cannot be loaded.

        Connect the Google Sheet to Power BI using a service account that has access to the sheet, so the data loads centrally and not based on individual user permissions. Then apply Row-Level Security (RLS) and use conditional DAX measures to show blank values for columns from Table B for users without access. This way, users will see the full visual with restricted data showing as blank, without exposing the actual Google Sheet or its contents.

         

        Glad I could assist! If this answer helped resolve your issue, please mark it as Accept as Solution and give us Kudos to guide others facing the same concern.

         

        Thank you.