Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Row level security not working in web

Hello,

 

My RLS works only on Power BI desktop and o Power BI Web this message appears:

 

The query encountered security filters on a table relationship that cannot be reconciled for the current user. Please contact your administrator or developer to review role memberships and security definitions.

 

A long time ago I've implemeted RLS on my reports, it was working normally, but now I had to change some relatationships and RLS works only on desktop. Before I had just one table with all uniques workers.

 

|Workers|

|    id      |

region  |

name  |

|  email  |

 

But now, a worker can have multiple regions, so Workers table has a worker multiple times, with, same id, name and email, the only thing that changes is its email. For example,

 

Before file update

1, Center, Carlos, [email protected]

2, East, Maria, [email protected]

3, West, Bruno, [email protected]

 

After file update

1, Center, Carlos, [email protected]

1, East Carlos, [email protected]

2, East, Maria, [email protected]

2, South, Maria, [email protected]

2, Center, Maria, [email protected]

3, West, Bruno, [email protected]

 

To fix that, I created a bridge table, with distinct user IDs. And applied a both direction relationship and checked "Apply Security Filter in Both Directions". 

 

This works correctly in Power BI Desktop, but on Power BI Web does not.

How can I fix that and why this works only on Desktop?

 

Thanks!

9 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    The Row-level security (RLS) rule with Power BI only worked in my case when in Workspace I define that users have only Viewer access.

    • Anonymous's avatar
      Anonymous
      Not applicable

      v-chuncz-msft, I was, also, using latest version o Power BI.  The problem happens because of those relationship that I mentioned on my question. As soon as I unchecked "Apply Security Filter in Both Directions"the problem was gone.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Having the same issue

       

      • mwest's avatar
        mwest
        Frequent Visitor

        I'm also having the same issue -- same error message as Anonymous

         

        I have the most updated version of Power BI desktop. I have not made any updates to RLS prior to the error occuring. And the issue only occurs for certain users.

         

        I'm submitting a ticket with Microsoft, since I haven't been able to find any other solution.

  • Anonymous's avatar
    Anonymous
    Not applicable

    mwest and Anonymous, 

     

    Have you chaged your dax code to use UserPrincipalName() instead of UserName()?

     

    There is a note on Power BI documentation:

     

    Note

    When creating cross filtering DAX formulas in Power BI Desktop, use UserPrincipalName(which is often the same as a user's login, such as [email protected]) instead of UserName. As such, you may need to create a related table that maps UserName (or EmployeeID, for example) to UserPrincipleName.

     

    Hope it helps!

  • cphilpotts's avatar
    cphilpotts
    Frequent Visitor

    I'm having this exact same issue. Has anyone figured out a solution? Works great in desktop but as soon as it's published the report breaks. 

     

    • mwest's avatar
      mwest
      Frequent Visitor

      Hey cphilpotts - It turns out that I had a single user in two different security groups. I gave him access via his email to one security group (with global permissions), and he was also in a org wide user group (i.e. Mangers) that had limited permisisons within this specific data set. The two different sets of permissions conflicted with each other and threw up the error.

       

      I resolved it by removing him from the Managers user group so that he was only in one RLS group via his personal email.

       

      Not sure if this is the issue for everyone - I felt pretty silly when I finally resolved it.

      • Anonymous's avatar
        Anonymous
        Not applicable

        I had the same problem and the solution wa to establish only one kind of secutity for every user.