# How can a Dataverse custom API return the same business result when a caller retries?

Exam: AB-400 — Power Platform Developer Associate
Knowledge domain: Extend Microsoft Power Platform (35–40%)
Updated: 2026-11-25T06:47:21.554112+00:00
HTML: https://learningpathx.com/faq/AB-400/ab400-dataverse-custom-api-idempotent-replay.html

## Also asked as

- How do I make a state-changing Dataverse custom API safe to replay after a lost response?
- How should a Dataverse custom API recognize a repeated request and return its recorded result?

Have the custom API accept a stable logical request identifier and store its association with the caller's operation, target and recorded business result. On a valid replay, return that recorded result and make it clear whether this invocation changed state. A typed GUID parameter provides a place to carry identity. The implementation must enforce uniqueness and make the state transition and result recording consistent under concurrent requests. [Dataverse custom API parameters and results](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/custom-api) · [Dataverse alternate keys](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/define-alternate-keys-entity)

For a release action, a caller can retain `RequestId` after losing the response. Define `ReleaseId` as the durable release identity, and use `Changed=false` for a successful replay of that existing result. Reject reuse of the same request key for a different target or business payload. Return a controlled failure for an ineligible or unauthorized release. When both Dataverse writes must succeed together, use the same supported standard-table pipeline transaction and verify transaction participation with `IsInTransaction` and a forced error. Avoid batch wrappers such as `ExecuteTransactionRequest` inside plug-in code. An external write needs its own recovery contract if it can succeed before local failure. [Dataverse event framework](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/event-framework) · [Avoid batch requests in plug-ins](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/best-practices/business-logic/avoid-batch-requests-plugin)

In a development environment, send the same authorized request twice, repeat it concurrently and repeat it with a different target. After losing an otherwise successful response, recover by the original ID. Confirm that the accepted calls refer to the same durable result and that only one business transition exists.

Source: [AB-400: Custom APIs, Business Events and Plug-in Identity](https://learningpathx.com/news/ab-400-custom-apis-business-events-and-plug-in-identity.html)
