Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ju97
Advocate I
Advocate I

RLS and USERELATIONSHIP problem

A long standing report has recently had a large majority of visuals show the error when RLS controlled users access:

"The UseRelationship() and CrossFilter() functions may not be used when querying ‘TableA’ because it is constrained by row-level security defined on ‘TableA’ or related tables"

I'm aware of this error and why it occurs, but the report has been working fine, hasn't had any major changes recently, and this issue has only appeared over the weekend.

 

Can you please confirm if you are aware of that issue and if we can expect some help from you?

62 REPLIES 62
EdouardLC
Regular Visitor

Same issue for my customers..

mostvp123
Kudo Collector
Kudo Collector

Reposting my reply to another comment on this thread for visibility:

To memory - the purpose of this error is to prevent exposing data to users which they should not see, if there is an active relationship between a dimensional table where RLS is applied, and fact tables in the model. The active relationship propagates RLS from the dimensional table to the fact table. If there was a second, inactive relationship, between the dim table and fact table, trying to enable by using USERELATIONSHIP would cause the error.

However, if there was no active relationship between the two tables (for example, two inactive relationships), USERELATIONSHIP would still work fine. I'm guessing because the lack of an active relationship means RLS is no longer propagating any filters to the fact tables. That is how my model is structured. It seems such a setup is no longer working since this bug started, and in my view, there should be no reason for that. It is almost as if any usage of USERELATIONSHIP between a dimensional table with RLS and fact table is now banned. We need this changed reverted as soon as possible, it also severely limits the usefulness of this formula.

Madsdreyer
Advocate II
Advocate II

I have been writing with MS support and the reply is:
"USERELATIONSHIP cannot be used when row level security is defined for the table in which the measure is included."

"so please try to avoid those functions"
Also see this https://learn.microsoft.com/en-us/dax/userelationship-function-dax#remarks

So it is not a bug  ... 

I don't know that to do.... 

To memory - the purpose of this error is to prevent exposing data to users which they should not see, if there is an active relationship between a dimensional table where RLS is applied, and fact tables in the model. The active relationship propagates RLS from the dimensional table to the fact table. If there was a second, inactive relationship, between the dim table and fact table, trying to enable by using USERELATIONSHIP would cause the error.

However, if there was no active relationship between the two tables (for example, two inactive relationships), USERELATIONSHIP would still work fine. I'm guessing because the lack of an active relationship means RLS is no longer propagating any filters to the fact tables. That is how my model is structured. It seems such a setup is no longer working since this bug started, and in my view, there should be no reason for that. It is almost as if any usage of USERELATIONSHIP between a dimensional table with RLS and fact table is now banned. We need this changed reverted as soon as possible, it also severely limits the usefulness of this formula.

Our model does not have RLS directly defined on the table in which the measure is included (we have a seperate measures table anyway) but its like the security filter is now not working as it was?  
We also cannot replicate the issue in Desktop by impersonating the RLS user so it feels like if this was intended behavoir it would also give the same error?

I think if something has been working a certain way for YEARS and then suddenly doesn't it's a bug, but yeah, we are in the same boat, not sure what to do.

Bbooogie
Advocate I
Advocate I

Like many others. We got the same problem in some of our reports.

AndreiP90
Frequent Visitor

I have the same issue as well, but there is the following issue, on the description of the function it specifies that it shouldn't work with RLS. It is so confusing.

 

You have a function that works for years and now you patch it up? Just leave it as it is and create a new one for the intended purpose.Relationship.JPG

 

Can you please link the Remarks?

 

robertnorman
Advocate II
Advocate II

According to user, 11 pm Swedish CET+1, everything worked fine. Now we have the same problem. Alot of things bugged out. How do we elevate this? Is reporting to MS support even gonna help to prioritize, and where is the best place to report; is it here: https://app.powerbi.com/admin-portal/supportCenter?experience=power-bi

Col_Mar
Advocate I
Advocate I

We have the same issue.  Seems to have appeared all of a sudden on a report which wasn't an issue before.

mostvp123
Kudo Collector
Kudo Collector

Same issue. Is affecting crucial report. 

Madsdreyer
Advocate II
Advocate II

We have this issue as well.

Unfortunately we also encountered this problem. We use the userelationship with rls to separate 2 groups from which one is not able to see certrain private data and the other group is able to see the data. Now the reports only show the error. 

Microsoft please fix this as there is no other possibility to secure our data without unwanted replicating tables is our semantic models.

Hi @wdv72 ,
Apologies for the issue you are facing.
The product team has taken note of the situation and is working on it, if there are any new developments we will reply below.
Appreciate your patience.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

ElsDEs
Advocate I
Advocate I
dhoskins
New Member

Same issue for me, no changes made to the report but since the weekend it displays this error across visuals in our report on the service and embedded in our SaaS platform.

 

When testing RLS roles in desktop, no errors are displayed

Same here, but we are on novermber PBI desktop. saw errors mentioned in the january PBI desktop version...

Idrissshatila
Super User
Super User

Hello @ju97 ,

 

i didn't see such issue here so far, but you can open an issue that will be investigated by microsoft support and they will assist you if this is a bug https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues/tab/most-recent

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Any more suggestion?

robertnorman_1-1737039410540.png

 

This is indeed a bug. If you are a super user why dont you help reporting it. Your link leads to a "New Idea"-request. Sure will try that as well, (but we all know that wont help - quickly).

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.