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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors