Forum Discussion

shaswat's avatar
shaswat
New Member
1 year ago
Solved

Dataset refresh anomaly: API accepted new refresh while one was running

Hi community, We ran into an unusual refresh behavior and would appreciate confirmation from Microsoft or other experts. Issue observed A dataset refresh triggered via Logic App + Power BI REST ...
  • v-kpoloju-msft's avatar
    1 year ago

    Hi shaswat,

    Thanks for sharing the detailed breakdown it really helps to understand what happened here. From your description, the key concern is that a long-running refresh (started at 10:47pm) kept going for hours, but after ~50 minutes the API began returning 202 Accepted instead of the expected 409 Conflict. This gave your Logic App the impression that refreshes were successful even though the original job was still active.

    This behaviour is not expected per our documentation. Normally, if a refresh is already in progress, the API should return a 409 Conflict. Refer this link: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset

    What you likely experienced is a refresh that got stuck in a “ghost state” on Premium capacity. In such cases, the service may lose track of the running job and start accepting new refresh requests. While rare, this has been observed in Premium environments.

    Validate refresh completion using Get Refresh History API: Instead of relying only on 202 vs 409, check the actual refresh state after triggering a job. Add monitoring for long refreshes: You can use capacity metrics to track unusual refresh durations and set up alerts.
    https://learn.microsoft.com/en-in/rest/api/power-bi/datasets/get-refresh-history-in-group

    Consider cancelling stuck refreshes: If a refresh runs far beyond expected thresholds, the Cancel Refresh API can help reset the state.
    https://learn.microsoft.com/en-in/rest/api/power-bi/datasets/cancel-refresh-in-group

    Hope this clears things up. If you have any doubts regarding this, please feel free to ask here. We will be happy to help.

    Thank you for using the Microsoft Community Forum.