Polling Power BI Dataset refresh status (statusCode)
When a Dataset is refreshed with the Refresh a dataset action, querying statusCode will return 202 as soon as the refresh is triggered. I want to confirm that the refresh completed and test if it is 200 or 400 afterwards, to check if it was successful but, running int(actions('Refresh_a_dataset').outputs.statusCode) always returns 202. How can I get the status to update after the refresh has completed? I can see from the refresh history that it was well and truly completed before the do while timed out.