Forum Discussion
Steps required to use Power BI API with a Service Princpal - Doubts
- 1 year ago
alfBI, Sorry for the delayed repsonse here.
To allow a Service Principal (SP) to refresh a dataset using the Power BI REST API, both actions are required:
- Grant API permissions in Entra ID – Assign the necessary API permissions (such as Dataset.ReadWrite.All) to the SP in Entra ID.
- Enable Service Principal access in Power BI Admin (Tenant Settings) – Under "Admin API settings" in Power BI Admin Portal, allow service principals to use Power BI APIs.
Regarding workspace access:
- Dataset.ReadWrite.All in API permissions grants access to all datasets, but it does not override workspace-level permissions. The SP must still be assigned the necessary role (Admin, Member, or Contributor) in each workspace where it needs to refresh datasets.
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
alfBI, As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query