Forum Discussion
User name
Hello
I share a Power BI report on Teams. I have defined rulls in my report to limite access according to the person who use the report.
I would like to calculate the name of the person who has opened the report on Teams to limit his view according to the rull I have defined for him.
How can I calculate this?
Thanks for your help.
Olivier
Hi OlivierL972 - To calculate and apply row-level security (RLS) based on the name of the person who opens the Power BI report in Microsoft Teams, you can use the USERNAME() or USERPRINCIPALNAME() function in Power BI, which retrieves the logged-in user's credentials.
Ref links:
Power BI: Dynamic Security Using USERPRINCIPALNAME ()
Row level Security on a Report Shared in Microsoft... - Microsoft Fabric Community
- Anonymous1 year ago
Hi OlivierL972
Thank you very much rajendraongole1 for your prompt reply. Allow me to add something.
Here are some specific steps to help you set up row-level security (RLS) in Power BI:
Here's some dummy data
“Name“
"Sales"
1.
Modeling -> Manage roles2.
[email] == userprincipalname()3.
After setting up the RLS, publish the report to the Power BI service. In Power BI Services, go to the Settings page for the dataset and select Security.
4.
Share the report to teams.
Here is the result.
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- rajendraongole1Super User
Hi OlivierL972 - To calculate and apply row-level security (RLS) based on the name of the person who opens the Power BI report in Microsoft Teams, you can use the USERNAME() or USERPRINCIPALNAME() function in Power BI, which retrieves the logged-in user's credentials.
Ref links:
Power BI: Dynamic Security Using USERPRINCIPALNAME ()
Row level Security on a Report Shared in Microsoft... - Microsoft Fabric Community
- AnonymousNot applicable
Hi OlivierL972
Thank you very much rajendraongole1 for your prompt reply. Allow me to add something.
Here are some specific steps to help you set up row-level security (RLS) in Power BI:
Here's some dummy data
“Name“
"Sales"
1.
Modeling -> Manage roles2.
[email] == userprincipalname()3.
After setting up the RLS, publish the report to the Power BI service. In Power BI Services, go to the Settings page for the dataset and select Security.
4.
Share the report to teams.
Here is the result.
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.