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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Amit_Saxena
Employee
Employee

I want to implement RLs based on restricted user access to City and product both ,

Hi,

Need help!

I am looking for solution in implementing RLS if we restricted access of user for City and Product both, for example based on the user mapping user should be able to see restricted city and restricted products, here in my example Mike has access to Mango Product  and could see data for Japan only. Here i am able to implement the city level RLS and it's working fine in PBI services while publishing we could see that Mike has access to Japan only but he should be able to see only one product, which is Mango, whereas through test role i could see both(Mango and orange) products are appearing.

 

https://drive.google.com/drive/folders/1ZHLGo90l5a4fJzt8d6bpRkFX4z6CmH6R?usp=sharing

 

 

Please suggest!

Thanks, Amit

3 REPLIES 3
GilbertQ
Super User
Super User

Hi @Amit_Saxena 

 

What you will need to do is for the Role you would need to filter both tables.


You would create a role and then put in the following filters:

  • Country Table
    • 'Country'[Country] = "Japan"
  • Product Table
    • 'Product[Product] = "Mango"

 

And then once uploaded to the Power BI Service add Mike to this role.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hi GilbertQ,

 

Many thanks for your response, but my ask is not restricted with specific use case this isjust an example, ask would be once user access thrugh his/her alias and based on the Country access he /she is allowed to see and based on product access he/she is allowed to see. So let say users has limited access and they can only see the counrty data they are allowed to see and only product they are allowed to see, my RLS for Country is workingfine but for Product it'snot working. Also i have created one role here and  two filters in teo different dimensions:

Security City & user on Alias

Security Product & user on Alias

as 
[UserAlias] = left(USERPRINCIPALNAME(), SEARCH("@", USERPRINCIPALNAME())-1)

 

Would be great if you could check my PBI,link is attached.

Appreciate yuor support!!

Thanks, Amit

 

 

 

 

 

Hi @Amit_Saxena 

 

As with my example you will have to place the filters on BOTH tables.


Then going into the Power BI Service you will add the users USERPRINCIPALNAME to the role you created.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors