Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi Guys,
I managed to set up all rest apis in Postman:
1. Get access token for my registered app service principal:
2. Get commands like :
GET https://api.powerbi.com/v1.0/myorg/groups
3. POST *.pbix into workspace:
POST https://api.powerbi.com/v1.0/myorg/imports?datasetDisplayName={datasetDisplayName}
4. Get Import ID response in order to get underlying detaset id of imported report:
https://learn.microsoft.com/en-us/rest/api/power-bi/imports/get-import-in-group
But i stucked on this st API to take ownership of datasets (and in the next step update gateway permissions to blob storage and update parameters):
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/Default.TakeOver
I am getting 403 error which means that I can not have access to do this.
How to take ownership of imported report for service principal ?
What is missing here?
Best,
Jacek
Solved! Go to Solution.
Hi @jaryszek
Thanks for your efforts and bringing back your concern to us. Below is the breakdown for your concerns also which helps in understating better.
If this post helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Please try the folliwng steps:
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Hello,
thanks! I have done first 3 steps without any issues.
But this one:4. Execute Default.TakeOver API Call
- Use the following endpoint to take ownership of the dataset:
- Ensure that:
- The access token used has sufficient permissions (Dataset.ReadWrite.All or equivalent).
- The service principal is already an admin of the workspace.
How service principal can has access to DataSet.ReadWrite ?
I need to take ownership for dataset by ServicePrincipal, not user!
Best,
Jacek
Hi @jaryszek
Thank you for reaching Microsoft Forum Community.
In response to your query about transferring ownership of an imported dataset using a service principal via REST API, here are the steps to address your concern:
Also, the links which you provided are not accessible. Below is the screenshot:
If this helps, then please Accept it as a solution and dropping a "Kudos" so other members can find it more easily.
Thank you
Hello,
thanks!
- The service principal needs Admin access to the Power BI workspace to take ownership of the dataset. Without it, ownership cannot be transferred.
- confirm that the service principle is enabled in the Power BI Admin Portal under Tenant settings. Ensure it is allowed to use Power BI APIs and is part of the permitted security group if restrictions apply.
- Please verify the groupId (workspace ID) and datasetId (dataset ID) in the API call for accuracy.
These are done and checked.
But this one:
- The service principal must have the Dataset.ReadWrite.All permission in Azure Active Directory. This is essential for the Default.TakeOver permission of API to function. Ensure admin consent is granted for these permissions in Azure AD.
Is interesting.
But Dataset.ReadWrite.All permission is only delegated so behalf on user, not service principal.
Is there possiblity to do this via Azure portal in some other way? Or only programatically in powerShell?
If yes, how?
Best,
Jacek
Hi @jaryszek
Thanks for your efforts and bringing back your concern to us. Below is the breakdown for your concerns also which helps in understating better.
If this post helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.