# How should I structure a governed service-request integration lab in Power Platform?

Exam: AB-400 — Power Platform Developer Associate
Knowledge domain: Build Microsoft Power Platform solutions (15–20%)
Updated: 2026-11-25T06:47:17.997888+00:00
HTML: https://learningpathx.com/faq/AB-400/ab400-design-governed-request-integration-lab.html

## Also asked as

- How can I build an isolated Power Platform lab that records one durable mock dispatch receipt per request?
- Which components and identities belong in a governed Dataverse request-to-receipt lab?

Use an isolated solution with a user-or-team-owned request table, a separate organization-owned receipt table, a manual parent and child flow, and one custom connector operation to a disposable HTTP Azure Function. The Function's only business effect is a durable mock receipt in the second table. Run sequentially as one authorized operator and use synthetic data.

Give the parent an operator-owned Dataverse connection, with create, read and write access to the operator's request rows. Use another ordinary user to test row and flow denial. Have the Function authenticate to Dataverse as a separate application user with receipt Create and Read access only. Keep the Function endpoint key in the connector connection and the downstream identity credential in protected Function configuration. Keep setup and teardown under a separate admin identity.

Key both tables by the nonempty source and external request ID, and check that both alternate keys are Active before testing. Keep the business ID and payload stable during replay. In this fixture, the key is `LAB` plus an uppercase alphanumeric request ID. The receipt stores the category and site together. Generate a new attempt GUID for each parent run. The attempt ID and fault mode describe the invocation and stay outside the stable key and payload comparison.

Use a single `POST /api/mock-dispatch` operation. Put the Function key in the connector's separate API-key credential parameter and define the JSON body fields as source, requestId, category, site, attemptId and faultMode. On an exact match, return the existing receipt ID. Reject a changed payload as a conflict. When a create response is uncertain, look up the same key and compare the stored payload before classifying it as a replay. Keep the Function's receipt role read/create only so a replay cannot overwrite the original payload.

Use a manual child in the same solution with the connector's embedded connection. Match the response identity and require its receipt ID before returning Accepted. Map invalid input to Rejected, a payload conflict to Conflict, an authentication denial to Blocked and an ambiguous result to Unknown. Have the parent check the request and save Sending before dispatch. It records Succeeded and the receipt on acceptance, Rejected on rejection or conflict, Blocked on denial, and Reconcile on uncertainty. A failed final update may leave Sending. Inspect the receipt ledger and the final write before attempting recovery.

Prepare the expected outcomes before creating fixtures. At cleanup, stop lab flows and settle outstanding runs, retain redacted evidence, remove the dependency-bound fixtures and connections, revoke dedicated credentials, and verify removal of separately billed lab resources. Treat the exercise as validation of a bounded mock contract.

[Create child flows](https://learn.microsoft.com/en-us/power-automate/create-child-flows) · [Dataverse alternate keys](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/define-alternate-keys-entity) · [Manage Dataverse application users](https://learn.microsoft.com/en-us/power-platform/admin/manage-application-users) · [Azure Functions access keys](https://learn.microsoft.com/en-us/azure/azure-functions/function-keys-how-to) · [Import an OpenAPI connector](https://learn.microsoft.com/en-us/connectors/custom-connectors/define-openapi-definition)

Source: [AB-400: Lab: A Governed Service Request Integration](https://learningpathx.com/news/ab-400-lab-a-governed-service-request-integration.html)
