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
Anonymous
Not applicable

Power BI API Full Refresh Dataset Fails

 

1. Created a service principal - API Permssions Dataset.ReadWrite.All and Report.ReadWrite.All

2. Enabled service principals access to Power BI tenant

3. Added the service principal into Workspace Dev

4. Imported dataset model and reports to a Workspace Dev - Success

5. Update Parameters and Datasources via API - Success

6. Full Refresh API kicks off after several seconds always Failed. Incremental Refresh run for a minute and completes.

  

error view on the Power BI service, I can't find a detailed error log for a meaningful information. Any idea to troubleshoot this process, I have exhausted google search.

 

Data source error:Retry attempts for failures while executing the refresh exceeded the retry limit set on the request.

 

Power BI API on Post refreshes return 202 accepted.

 

$report = Get-PowerBIReport -Name $ReportName -WorkspaceId $workspace.Id -Verbose

$templateUrl = "https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/refreshes"
$urlPostRefresh = $templateUrl.Replace("{datasetId}", $report.DatasetId).Replace("{workspaceId}", $workspace.Id)

$refreshBody = @'
{
"type": "{type}",
"retryCount": 2
}
'@
$body = $refreshBody.Replace("{type}", $type)   ===> is replace with either Full or Automatic

 

Invoke-PowerBIRestMethod -Url $urlPostRefresh -Method Post -Body $body -Verbose

 

 

3 REPLIES 3
otravers
Community Champion
Community Champion

Is this in a Pro or Premium workspace? With Pro you're limited to 8 refreshes per day so maybe you consumed them while testing? Does it work when you refresh that dataset manually?

------------------------------------------------
1. How to get your question answered quickly - good questions get good answers!
2. Learning how to fish > being spoon-fed without active thinking.
3. Please accept as a solution posts that resolve your questions.
------------------------------------------------
BI Blog: Datamarts | RLS/OLS | Dev Tools | Languages | Aggregations | XMLA/APIs | Field Parameters | Custom Visuals
Anonymous
Not applicable

The client has Embedded PowerBI, upon manual refresh got error "Scheduled refresh has been disabled". The owner of dataset is the service principal which has worked on creating/updating datasets and reports and updating Parameter and Datasource for each workspace Dev/Uat.

Power BI dataset/report solution is the cloud but I have read to allow manually refresh fo service principal requires to be added on the managed gateways data source as list of users but again client solution is on the cloud.

On a dataset its Datasource was replaced successfully correct database and database server which is the one trying to do a Full refresh via API. Interesting enough needs further investigation on another dataset same Workspace updating database and server, it worked but it kept the old configuration database and server; hence I do have two entries, search how to fix this one cause would have issues Incremental/Full Refresh.

Anonymous
Not applicable

I have read this as well, 

 

Bootstrapping the initial refresh operation either through Tabular Editor or creating an empty query in Power Query to allow the service to create partition objects for the incremental refresh table, but not load and process historical data.

 

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.

Top Solution Authors
Top Kudoed Authors