Forum Discussion

endel's avatar
endel
New Member
9 months ago

I can trigger a dataflow refresh using REST API but cannot cancel it

Context

We currently have an issue with credentials in dataflows after they're taken over (usually after deployment via pipeline), so we wanted an automated check on that before our weekly refresh.

 

Our Solution

Since we cannot do it using REST API (dataflows API won't allow testing the connection on data sources) I thought of triggering a refresh and cancelling it a couple mins later (we have one dataflow per table, so it would fail immediately). We need to cancel them because tables are very large, so it'd impact our backend.

 

Problem

I can trigger the dataflow refresh via API, but cannot cancel it via API. It says "No refresh in progress".

I have the same issue even if I use the MS Learn editor. I can see the transaction in progress if I call Get Dataflow Transactions (API or browser). The scopes required for Cancel Transaction are the same as Refresh Dataflow, so I assume I have the proper permissions. Has anyone had this issue before? 

 

4 Replies

Replies have been turned off for this discussion
  • v-aatheeque's avatar
    v-aatheeque
    Community Support

    Hi endel 
    Thanks for reaching out to Microsoft Fabric Community Forum.

    Based on the above error  the issue with canceling a dataflow refresh via the REST API after successfully triggering it. You're already able to trigger the refresh, but when you try to cancel it, you're receiving a No refresh in progress.

    Here are some workaround which may help you.

    • Even if the transaction appears under Get Dataflow Transactions, the Cancel Transaction API may still return "No refresh in progress" due to timing or state synchronization delays in the backend.
    • After triggering a refresh, the transaction may not yet be fully registered or marked as InProgress when the cancel request is made.
    • If the refresh completes or fails very quickly, the window to cancel it is extremely short  this can also trigger the same error.
    • Try adding a 2–3 minute delay between triggering the refresh and calling Cancel Transaction to give the system time to register the transaction as active.
    • If multiple transactions are returned, cancel only the one with the status = "InProgress", not those in Queued or Completed state.

    Hope this helps !!
    Thank You.

    • endel's avatar
      endel
      New Member

      Actually, I'm triggering the dataflow refresh, then wait a few seconds and request the refresh history to get the ID of the one in progress, so I believe this discards the hypothesis of being out of sync.

      • v-aatheeque's avatar
        v-aatheeque
        Community Support

        Hi endel 

        Thanks for confirming your setup. Since you’re already triggering the refresh and retrieving the history immediately after, the process should typically stay in sync.

        If you’re still observing mismatched or missing refresh IDs despite this, it might require a deeper review from the Power BI service side. I’d recommend opening a Microsoft Fabric Support and Status | Microsoft Fabric.

  • We have no problems issuing cancellation requests for dataflows in flight.*  We do this continuously on our tenant because we are limiting dataflows to the same 5 hours as the semantic model refresh limit.

     

    * Remember that this is only a request.  If and when it gets honored is rather random, and depends on where in the process the dataflow is.  We have also anecdotal evidence that cancellations are not to be confused with rollbacks.