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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors