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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
jaryszek
Resident Rockstar
Resident Rockstar

Update programatically dataset security roles

Hi Guys,

I discovered that there is still not REST APIs for updating RLS roles for specific datasets. 
But I found that through XMLA endpoint it is possible.

I am using REST Client with Visual Studio Code to get to XMLA Endpointand need to execute command like here:

GET https://powerbi://api.powerbi.com/v2.0/myorg/PowerBIReports({{datasetId}})/DataModelRoles
Authorization: Bearer {{$aadV2Token appOnly}}

 

it is working for usual rest apis like this one using service principal:

GET https://api.powerbi.com/v1.0/myorg/groups
Authorization: Bearer {{bearerToken}}

 

Why this is not working? How to get into this roles using rest client in visual code? Any alternative? 

Best Wishes,
Jacek

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi There is a confusion here. This is the Power Bi Service forum but the question is showing a API Rest from PowerBi Report Server.

In case you are asking for Report Server, then the Base URL is not that one. The base URL is:

[ Base URL: localhost/reports/api/v2.0 ]

https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/PowerBIReports/GetPowerBIReportDataModelRole...

On the other hand if you are talking about the cloud and PowerBi Service then there is no request for RLS at all. Here you can find the requests available: https://learn.microsoft.com/en-us/rest/api/power-bi/

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @jaryszek,


Thanks @ibarrau for Addressing the issue.

 

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Vinay Pabbu

ibarrau
Super User
Super User

Hi There is a confusion here. This is the Power Bi Service forum but the question is showing a API Rest from PowerBi Report Server.

In case you are asking for Report Server, then the Base URL is not that one. The base URL is:

[ Base URL: localhost/reports/api/v2.0 ]

https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/PowerBIReports/GetPowerBIReportDataModelRole...

On the other hand if you are talking about the cloud and PowerBi Service then there is no request for RLS at all. Here you can find the requests available: https://learn.microsoft.com/en-us/rest/api/power-bi/

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors