Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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!

3 Replies

  • 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's avatar
      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.

      • V-lianl-msft's avatar
        V-lianl-msft
        Community Support

        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.