The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Does RLS have the ability to combine different fields in the RLS role, in the manage roles section?
For example, I have sales team members who might have opportunities that span across a team that they are not technically part of.
For example, John Smith is part of Team A. However, an opportunity might come in for an account that is an account that belongs under Team B, but John gets involved for whatever reason.
So I need RLS to see John's userprincipal name, and filter out the correct team that he is a part of, but also to filter any other opportunity on team's that he not officially attached to. I've tried using something like UPN && Team Name in my RLS, but the result always filters out everthing when I go to test it. Taking off UPN resolves the issue, but then I just see only the one team name. I do have a dim_user table.
Hi @Anonymous ,
Create a RLS role such as below:
[UPN] = userprincipalname()&& [Team] = "A"
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
@v-kelly-msft Hi Kelley - This is the exact setup that I have. However, if I "test the role" using anything with UPN it just shows me blank values in the tables. If I take UPN out of the formula, then I can see the data again.
In my scenario, I am trying to test for certain users, that belong to a certain team. I want "Joe Smith" to only see his content, and only for Team "A". That is why I need the combination. In the desktop environment, I can test both the role and a particular user. But online, you are not given that choice...you can only test as the role. So I can never tell exactly what my users might be seeing.
Also, I cannot test on the actual report that my users see....I can only test on the dataset report that RLS is setup on. (my users see a report that is connected via a live connection to the dataset that has RLS setup).
Hi @Anonymous ,
Create a measure as below :
measure =
USERPRINCIPALNAME ()
Check whether you have tested the correct UPN,as tested here,it works fine.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!