Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
We are trying to use the PowerBI Rest API without users.
Mainly being able to refresh datasets during the ETL is the goal.
Now are we using Azure Data Factory as the application to do all the API Calls.
For this we have created an Application Registration as described by Microsoft.
Within this application we have granted the Service Principle Tenant.read.all and Tenant.ReadWrite.All permissions.
The datafactory is part of a Security group that has permissions to do API calls and that security group is a Admin of a particular workspace (test workspace).
Currently we are doing Web requests from Data factory to the Rest API endpoints using the managed identity from ADF as Authorization.
This seemed to work because we could do some calls (GET Group and GET Datasets within group).
- https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getdatasets
- https://docs.microsoft.com/en-us/rest/api/power-bi/groups/getgroups
But when we try to do a call to get the data sources or refresh the dataset we are getting the error: "API is not accessible for application".
- https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getdatasources
The PowerBI Rest API documentation defines which scopes are required for the different calls, but the scope for Get dataset is the same as the Get Datasource.
For the Refresh addiotional write permissions are needed (but should work i believe with Tenant.ReadWrite.All).
https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdataset
Also we have investigated the road as proposed in this blogpost but we would like to do it without the additional steps of getting a bearer token.
https://www.moderndata.ai/2019/05/powerbi-dataset-refresh-using-adf/
Any insights would be highly appriciated
Hi @DannyvB
Perhaps it is caused by the nature of the workspace.
As the solution for the case below
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.
Hi @v-yetao1-msft ,
Thanks for your Reply,
i have created a new Workspace to check if the workspace is the issue.
This unfortunatly doesn't seem the case.
I am still getting the API is not accessible for application.
On the Get dataset call everything goes okay, but datasources are unable to be retrieved.
Hi @DannyvB
I found a similar problem, maybe you can refer to it .
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.
Hi @v-yetao1-msft,
Thanks for your Reply.
We are currently using the New Workspaces, so that seems okay.
The strange thing is that we can do a GET on the datasets within our workspace and get all datasets, but are not able to get the datasources from that particular dataset.
On the Site from Microsoft the permission scope for both API calls are the same, so it is unclear to me why we get that error.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
106 | |
46 | |
23 | |
23 | |
21 |