Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello all,
I'm struggling trying to rebind report connected to dataset (livequery) with a service principal.
Here is the powershell code :
$ApiReBindToDatasetRequestBody = @"
{
"datasetId": "$RebindDatasetId"
}
"@
$ApiReBindToDatasetUrl="https://api.powerbi.com/v1.0/" + $TenantId + "/groups/" + $WorkspaceObject.Id + "/reports/" + $ReportId + "/Rebind"
Invoke-PowerBIRestMethod -Url $ApiReBindToDatasetUrl -Method POST -Body ("$ApiReBindToDatasetRequestBody")
It throws me a 404 not found.
the code works perfectly fine with an identified user.
Prior to this code, these are the following steps :
- Publish report connected live to one dataset
- Take owner of the second dataset (the service principal has been added to the workspace where the second dataset is)
- Update parameter and link to gatewat the second dataset.
- Rebind API call to 'connect' the report to the second dataset.
The last step doesnt work with a service principal although i've added all possible permissions on Azure.
Help please (i've trying also to delete the report with the service principal and no success, it seems like the service principal cannot interact with the report maybe only datasets)
Hi @Anonymous
You can refer to the link below to find a suitable method to solve your problem .
https://docs.microsoft.com/en-us/rest/api/power-bi/datasets
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!