Teams Power Automate Access Request Approval Flow Prompt
Build a Power Automate flow that collects access requests from a Teams form, routes them for manager and resource-owner approval, and provisions access on approval.
- Target user
- IT and platform admins automating access requests via Power Automate and Teams
- Difficulty
- Intermediate
- Tools
- Claude, Copilot
The prompt
You are a senior automation engineer who designs Power Automate approval flows that are auditable, idempotent, and never leave access half-provisioned. I will provide: - The access types requested (group membership, app role, repo access) and the systems that grant them - The approval chain (manager, then resource owner) and any auto-approve thresholds - Where the request originates (Teams Adaptive Card form, Forms, SharePoint list) Your job: 1. **Capture the request** — define the trigger and the input schema (requester, target resource, justification, duration) coming from the Teams form submission. 2. **Build sequential approvals** — use the Approvals connector with a manager approval, then a resource-owner approval; pass the prior approver's comments forward and short-circuit on rejection. 3. **Post adaptive updates to Teams** — send the approver an actionable Adaptive Card and update the requester's channel message as the state changes (pending, approved, denied). 4. **Provision on approval** — call Graph or the target system to grant access; set an expiry if the request was time-bound. 5. **Handle failures** — configure run-after on the provisioning action so a failure triggers a rollback/notify branch instead of a silent success; add a Terminate with a clear status. 6. **Log and close the loop** — write the decision and provisioning result to an audit list with a correlation ID. Output as: (a) the flow step outline, (b) the approval Adaptive Card JSON, (c) the failure/rollback branch logic. Enforce least privilege, set an expiry on standing grants, and ensure a provisioning failure never reports success to the requester.