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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MOVC
Helper II
Helper II

Dataset Refresh via API Failing

We have a dataset connected to Azure SQL published to a Premium workspace in our P1 Capacity with an incremental refresh enabled that works correctly when refreshed manually or on a schedule. However if we trigger the refresh via the API (in this case, the refresh dataset action in Power Automate) the refresh fails with the following error message:

Data source error{"error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"Microsoft SQL: A severe error occurred on the current command. The results, if any, should be discarded.\r\nA severe error occurred on the current command. The results, if any, should be discarded."}}

 

I can't find any useful information online about this, the error message is apparently from the SQL side but that doesn't seem to make sense with it only failing for API refreshes.

10 REPLIES 10
lbendlin
Super User
Super User

Which API are you using? Enhanced Refresh Request API?  Are you attempting to refresh the entire semantic model, or tables, or partitions?

 

Apologies if there was confusion, I was trying to use the Power BI connector in Power Automate (image) to carry out the refresh. There doesn't appear to be any additional settings so I assume it's trying to refresh the entire model. I can confirm that this method works for other semantic models that don't have incremental refresh enabled though, I was wondering if it was something specific about incremental refresh that was incompatible with the API method.

 

1.png

It looks like I have to use the enhanced API for this:

 

Enhanced refresh with the Power BI REST API - Power BI | Microsoft Learn

 

2.png

I guess you can't use the Enhanced Refresh via Power Automate?

Yes, you can, but you have to create your own custom connector and action. I can show you the swagger file if you want.

Unfortunately I don't have Tenant Level Administrator, I assume this will prevent me from being able to run the required API request? It was why I was trying to use Power Automate in the first place.

No, this has nothing to do with tenant administration. As long as you have permission to modify the semantic model you can run that API call.

Oh interesting, if you have an example then that would be great. Even if it's just so I can see how the API request is formed.

Here's how we implemented it

lbendlin_0-1722949955033.png

 

and here's a sample flow

lbendlin_1-1722950010223.png

 

Thanks, unfortunately our business has locked down the ability to register Azure AD apps so I'll have to get approval to test it (unless there's another way?).

Sorry to hear that.  One alternative is to use PowerShell instead. It has all the convenience modules, or you can hand craft your REST calls.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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