Forum Discussion

CarlBlunck's avatar
CarlBlunck
Icon for Resolver I rankResolver I
1 year ago
Solved

RLS on a PowerBI semantic model - OneLake Catalog

Hi,

I created a semantic model that has RLS applied to it and published this online. 

In a new pbix file, I connected to this semantic model through the OneLake Catalog and create a new report.

In the new report, I can't create a security role on any of the tables from the semantic model and based on the documentation I have read, this is as per design because it is using the same design as the published semantic model.

However, it seems like RLS application is not apart of this as I shared the report with a user who should only be able to see part of the report, but when they opened it, they could see all of the data within it.

Is this correct?  Or is there a step I am missing?

Thanks

Carl

 

  • Hi CarlBlunck ,

    Thanks for providing the additional details.

    RLS continues to work even if the report is published to a different workspace and then shared, so workspace-level access is not a factor here.

     

    The USERPRINCIPALNAME() function always returns the signed-in user’s UPN. If that value does not exist in the workemail column of your security table, the filter evaluates to FALSE() for all rows, which results in the user seeing a blank report. This is the expected outcome since RLS only allows data access to users that are present in the filter table.

     

    It is also important to ensure that the role you defined in Desktop is actually assigned in the Power BI Service. If the role is not assigned, the user effectively has no access, and the report will appear blank.

     

    Finally, since there is a many-to-many relationship between the RLS filter tables, that can cause filters not to propagate correctly and lead to unexpected or empty results. Redesigning the model to avoid many-to-many relationships in the RLS filtering path is generally recommended.

     

    Hope this helps. Please reach out for further assistance.

    Thank you.

20 Replies

  • Hi Carl,

    This is a common area of confusion with Power BI semantic models and RLS, especially when using OneLake Catalog connections.

    • RLS is enforced at the semantic model level. Any reports (child reports) you build off a published semantic model will inherit the RLS settings from the original model. You can’t create or edit RLS roles in these new/child reports.

    • Workspace roles, only users with the Viewer role in the workspace will have RLS applied. If the user is an Admin, Member, or Contributor in that workspace, RLS will NOT apply—they’ll see all the data, regardless of your RLS setup.

    How to verify RLS is working:

    1. In the Power BI Service, open your semantic model’s Security page.

    2. Use the Test as role feature to see exactly what a user assigned to a role will see.

    3. If you have measures or visuals only in the child report, you can copy them into the main semantic model file for testing.

     

    • CarlBlunck's avatar
      CarlBlunck
      Icon for Resolver I rankResolver I

      Hi rohit1991 

      Thank you.  This was my understanding as well but it appears this is not the behaviour.  Guess I'll log a ticket with support.

      What is happening:

      - child report is ignoring RLS that is working in parent semantic model

      - user that I am testing this with is seeing a result of 0 for a measure in the parent model but is seeing a result of 46 in the child model.

      - user does not have a workspace role and only has access to the report, not the semantic model

  • Hi Carl, when you connect a new report to a published semantic model with RLS, security roles from the semantic model should apply automatically, and users should only see data they're allowed to view. If users can see all the data, check if the RLS is properly set up and that the report is shared from a workspace where RLS is enforced, not bypassed. Sometimes, RLS is only active in supported environments (like Power BI Service), not always in local desktop or datasets shared incorrectly.
    Did I answer your question? Mark my post as a solution!

  • You must perform these actions on the original semantic model, not the new report you created.

    Find Your Semantic Model: In the Power BI Service, navigate to the workspace where you published your original semantic model.

    Open Security Settings: Find the semantic model in the workspace list. Click the More options (...) menu and select Security.

    Assign Members:

    On the Row-Level Security page, you will see the list of roles you created in Power BI Desktop (e.g., "Regional Manager," "Sales Rep").

    Select the role you want to assign users to.

    In the text box, start typing the email addresses or security groups of the users who should belong to that role.

    Click Add, and then make sure to click Save.

    Test the Role (Crucial Step):

    After saving, you can verify that the RLS is working correctly before asking your user to check again.

    Click the More options (...) next to the role name and select Test as role.

    A new browser tab will open showing a report view that is automatically filtered as if you were a member of that role. This allows you to confirm exactly what your users will see.

    Once you have assigned the user to their role and saved the changes, they will see the correctly filtered, RLS-applied data the next time they open the report.

     

    If this explanation and solution resolve your issue, please like and accept the solution.

  • Hi CarlBlunck ,

     

    That is a peculiar situation. I have not worked with OneLake Catalog yet but we did make multiple reports off a single semantic model. And yes, the child reports inherit the RLS from the semantic model setup. Now here is the method I used to verify whether the RLS was properly setup: Download the semantic model report file, paste the visuals from the child report to the main report file, use the View As Role option to see everything was working as expected for that role, repeat. (If you have new measures in the child report, you could manually add them to the mother report as well or just use visuals that do not have such dependencies). 
    Additionally, before you do all of the above, please verify the membership status of the user in the workspace (admins could be exempt from RLS) and if they have ownership of the dataset (owners could also be exempt).
    Hope it helps!

    • danextian's avatar
      danextian
      Icon for Super User rankSuper User

      Admins as well as contributors and members. RLS applies to those with a viewer role only.

      • CarlBlunck's avatar
        CarlBlunck
        Icon for Resolver I rankResolver I

        danextian does this mean that the user must have a workspace viewer role?  In my situation, I don't want the user to view the workspace, I only want them to access the report.

  • v-veshwara-msft's avatar
    v-veshwara-msft
    Icon for Community Support rankCommunity Support

    Hi CarlBlunck ,

    Thanks for posting in Microsoft Fabric Community.

    I tested this scenario in my environment. I created a semantic model with RLS, published it, then built a new report by connecting to the model through the OneLake Catalog. I shared the report with a user who was assigned to an RLS role on the semantic model but was not added to the workspace. When they accessed the report, RLS was correctly applied and only the expected data was visible.

     

    As rightly mentioned by others in this thread, the RLS roles need to be configured on the semantic model itself--not in the child report. Once users are added to the appropriate role under the model’s Security settings and changes are saved, RLS will apply. The “Test as role” option is helpful to verify what the user will see before sharing the report.

     

    To clarify : RLS does work in child reports for users who are not part of the workspace, provided they are assigned to an RLS role and access the report through direct sharing or an app. Just make sure they don’t have Admin, Member, or Contributor access to the workspace, as that would override RLS.

     

    References:

    https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-roles-new-workspaces 

    Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn

    Solved: Re: RLS without workspace access - Microsoft Fabric Community

     

    Also, since you mentioned earlier that you were planning to raise a support ticket - if you’ve already done that and received any clarification or resolution from the support team, it would be helpful if you could share the outcome here for the benefit of others following this thread.

     

    Hope this helps. Please reach out for further assistance.

    Thanks to everyone who shared valuable insights and contributed to this discussion.

     

    • v-veshwara-msft's avatar
      v-veshwara-msft
      Icon for Community Support rankCommunity Support

      Hi CarlBlunck ,
      Just wanted to check if the responses provided were helpful. Also if you have raised a support ticket and got any insights or resolution, could you kindly share here so that it would help others with similar queries.

      If further assistance is needed, please reach out.
      Thank you.

    • CarlBlunck's avatar
      CarlBlunck
      Icon for Resolver I rankResolver I

      Hi v-veshwara-msft how interesting.  This is not the behaviour I or the support tech is experiencing.  

       

      The support tech referenced this documentation to support this is expected behaviour as well - 

      Use composite models in Power BI Desktop - Power BI | Microsoft Learn

      • RLS rules are applied on the source on which they're defined, but aren't applied to any other semantic models in the model. RLS defined in the report aren't applied to remote sources, and RLS set on remote sources aren't applied to other data sources. Also, you can't define RLS on a table loaded from a remote source, and RLS defined on local tables do not filter any tables loaded from a remote source.

       

      When you built your 2nd report, by connecting to the published semantic model with RLS through the OneLake Catalog.  Did you do anything special?

       

      Cheers

      Carl

      • v-veshwara-msft's avatar
        v-veshwara-msft
        Icon for Community Support rankCommunity Support

        Hi CarlBlunck ,

        Thanks for sharing the update and for pointing out the documentation the support team referenced. That guidance is specific to scenarios with composite models (for example, when you combine a remote semantic model with additional local tables in the new PBIX). In that case, RLS is only applied on the source where it’s defined and doesn’t automatically extend to other sources.

         

        In my repro, similar to what you described, the second report was created by connecting through the OneLake Catalog to the published semantic model without adding any other tables or data sources. So the report was a “thin report” built directly on the remote semantic model, and RLS applied as expected for the test user.

        I didn’t do anything special beyond assigning the user to the RLS role on the original semantic model in the service as mentioned here and sharing the report directly with them (without giving a workspace role).

         

        If your child report includes additional tables or transformations (making it a composite model), then the behavior you and the support engineer observed would align with the documentation you cited.

        Could you confirm if your second report has only the semantic model connection, or if it also brings in other tables from other data sources? That distinction will help clarify why we’re seeing different results.

         

        Hope this helps. Please reach out for further assistance.

        Thank you.