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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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