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
EmaF
Microsoft Employee
Microsoft Employee

Row Level Security - adding users to role automatically

Is there any way I can add users to roles automatically? (e.g., through an API call)

1 REPLY 1
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@EmaF ,

Could you please share more information related to your requirement to help us analysis? You want to add user to role on PowerBI desktop or on PowerBI Service? How do you manage these users originally?

Generally, we can setup Dynamic RLS on PowerBI DeskTop, this method uses UserName() to recognize the current user, then it will use the security filter based on the username to other data, for more information, please refer to the following blogs:

http://radacad.com/dynamic-row-level-security-with-power-bi-made-simple
https://community.powerbi.com/t5/Community-Blog/Power-BI-Dynamic-Row-Level-Security-Tips-to-get-it-w...

For Power BI Service, we can firstly create a security group or distribution list in Office 365 to cover these users, then add the security group or distribution list as role member.
1.PNG2.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more 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.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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