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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
CARLOS_s
Regular Visitor

update Row-level security via Rest API or script

hello,
I need to make a script that makes the inclusion of users in the RLS of the semantic model of the application in Power BI Service.
Researching about it, I tried to see if it was possible via API, but I found that it is currently not possible. But I managed to get the following links below:

Uses the XMLA endpoint to add a user to a role for a Power BI dataset · GitHub
Solved: Can I update Row-level security via Rest API? - Microsoft Fabric Community
Solved: Can I update Row-level security via Rest API? - Microsoft Fabric Community
It is possible to make changes via XMLA endpoint through a powershell script. The first point of running via script was met but I arrived at another problem, the script must run inside a linux machine by a .bash or python script that is more generic without requiring any dependency on windows. The first link makes use of Microsoft.AnalysisServices.Server to connect to Power BI services and make changes in RLS. 
I would like to know if this is possible without requiring VM's or installation of some tool. If the solution is possible if you install some tool on the linux machine, what would it be?

Is it possible to add a user to the RLS function via .bash or python script?

1 ACCEPTED SOLUTION

Not that I know about or can see


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

4 REPLIES 4
v-venuppu
Community Support
Community Support

Hi @CARLOS_s ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Deku
Super User
Super User

You can create RLS roles with XMLA endpoint but cannot assign users, this has to be done in the service.


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Is there an endpoint in the Power BI services API that can add a user to RLS?

Not that I know about or can see


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors