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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Create security role automatically

Hi,

I have to create about 500 different security role, there's a way to create them automatically in one or few operations, avoiding to create them one by one manually?

Not sure if this is even possible at all but thought I'd give this a try anyway!

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Add another email address column for the office owner in the table, and then use the username() function for dynamic row level security, as described in a similar blog below.https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple 

 

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

View solution in original post

3 REPLIES 3
d_gosbell
Super User
Super User

There is not really anyway of automating role creation in Power BI Desktop at the moment. However it may not be necessary - if you google for "Dynamic Row Level Security" you will find lots of articles and videos about how you can create one role which can filter your model differently for every user. (I'm guessing that the reason you are getting a figure as high as 500 roles is that you have 500 users)

Anonymous
Not applicable

Thank you for the answer.

 

I have 500 offices and only office holders have to see their data.

Office holders or area managers (seen as holders of multiple offices) are into domain groups.

Hi @Anonymous ,

 

Add another email address column for the office owner in the table, and then use the username() function for dynamic row level security, as described in a similar blog below.https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple 

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors