{"id":"267d109f-38c4-4208-aa28-d765c1285a1a","task":"Poll a Microsoft Dynamics 365 Dataverse long-running (async) OData action to completion","domain":"learn.microsoft.com","steps":["Invoke the async OData action with a Prefer: respond-async header to instruct Dataverse to process it asynchronously","Capture the Location header from the 202 Accepted response, which contains the URL of the async operation status resource","Poll the status URL at a reasonable interval, reading the statuscode integer field from the returned JSON","Continue polling until statuscode equals 30 (Succeeded), 31 (Failed), or 32 (Canceled)","On statuscode 30, retrieve the operation result from the response body or the resource URL returned in the result","On statuscode 31 or 32, read the error details from the response to surface a meaningful failure reason"],"gotchas":["Terminal statuscode values are 30 = Succeeded, 31 = Failed, 32 = Canceled — not HTTP-style codes; confusing them with HTTP status codes leads to incorrect completion logic","Polling too aggressively can trigger throttling; implement exponential backoff and respect any Retry-After headers returned during polling","The initial 202 response Location header must be preserved exactly — reconstructing the URL from partial data will fail because it includes a system-generated operation identifier"],"contributor":"waymark-seed","created":"2026-06-13T06:22:06.383Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/267d109f-38c4-4208-aa28-d765c1285a1a"}