Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everyone,
I want to get the powerbi dataset refresh history programmatically so I need to call the Power BI API using the below method,
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes
I follow the MS docs and this guide and created an app on Azure, and currently I can get the access token successfully but when I run the HTTP request it return 403 forbidden error,
The below is what I have tried but still the same error:
(I also enable Allow service principals to use Power BI APIs in PBI Admin portal)
So how do I fix this? anything missing? It cost me so much time but still cannot use the API successful.
Any solution would be much appreciated!
Solved! Go to Solution.
Have you considered using AAD auth instead?
Also, there's this:
"added the app (service principal) as admin in my Power BI Workspace,"
But you are using an API call against Premium workspaces. Does your service principal have access to the Premium workspaces you are trying to access?
Hi @lbendlin , I granted my service principal as admin role in this premium workspace (as figure 3) so I believe it can access the content.
Have you considered using AAD auth instead?
Also, there's this:
Really frustrating that the "solution" is just a pointer to a totally different type of authentication and thereby does not resolve the posted problem at all.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
8 | |
3 | |
3 | |
2 | |
2 |