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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Davidu
Frequent Visitor

Need to show records which are related to logged in user based on User Teams

Hai All, 

 

I created a power bi report and i want to show the data which is related to logged in user. I gone through some of the articles. But, here the scenario is something different than others. Let say A is Table and the owner of the A table will be the Team then Team is associated with User.

 

If A table is having 2 members then that two members are the part of that team. At last i want to show only logged in user records in the report.

Can someone help me on this please. 

Thanks in advance 

2 REPLIES 2
v-yadongf-msft
Community Support
Community Support

Hi @Davidu ,

 

Dynamic Row Level Security is very suitable for your demands. Here's a sample for your reference.

 

This is my test table:

vyadongfmsft_0-1669359419459.png

 

Click on Modeling Tab and navigate to Manage Roles icon.  Then define a role name and right-click on the required table. We are going to use USERPRINCIPALNAME() in the filter condition.

 

This function returns the name of the user as their email address.

vyadongfmsft_1-1669359533912.png

 

 

Now we have completed the configuration in the desktop tool. We can test the roles in the desktop itself.

 

Under the Modeling tab, we have an icon called View as Roles. Click on that icon, we will get a new window.

We have to select both Other user and newly created Role. Then enter the email id of one user in the text box near to the Other user text.

vyadongfmsft_2-1669359713746.png

 

User will only see the records related to himself.

vyadongfmsft_3-1669359772004.png

 

If you share your reports on Power BI service, you should configure the RLS in app.powerbi.com.

 

For detailed steps, please refer the blog:Dynamic Row Level Security (Dynamic RLS) - Microsoft Power BI Community

 

Best regards,

Yadong Fang

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

Thanks for the reply @v-yadongf-msft !

I have one issue like based on user context report is refreshing data in power bi desktop application. But, when i published in CRM, filter is not working. Can you help me on this please!

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.