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
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
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.