Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BobStar
New Member

POWERBI API Refresh History insufficient authorization

Hi all, I try to get the refresh history from our datasets. The following documentation suggest it is very easy, but I cannot get it to work. https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getrefreshhistory When connecting to the API via the web data source with the https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes url I get the error : "we encountered an error while trying to connect. Details: "Access to the resource is forbidden."

  • I have Admin rights to the dataset and workspace In the PowerBI environment
  • I have admin rights as well The API I created has dataset read rights
  • The app has a registration in Azure AD The app is added to a working SPN
  • The SPN is added as an admin to the workspace.

    The only thing where I can think I got off is adding the wrong Home Page UR. Where can I find it? In examples it states the organisations' name, but could it be also https://app.powerbi.com/home ?

When testing the api here https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getrefreshhistory#code-try-0 it works...

 

1 REPLY 1
v-lionel-msft
Community Support
Community Support

Hi @BobStar ,

 

v-lionel-msft_0-1601864481564.png

Did you enter the correct parameters, please refer to the sample as below.

v-lionel-msft_1-1601864539623.png

 

Import data from REST API 

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.