Hello Sandy. You don’t need an Approval Policy step in this workflow. That action is designed for Adaptive Approvals, it creates a new review item and the workflow pauses until a reviewer acts on it. That’s why your workflow gets stuck. Remove it.
What @sushantkulkarni is describing is a different approach. When your workflow submits the access request, the Global Approval Policy creates a pending approval in the background. You then use the same workflow to find that pending approval and approve it programmatically, no extra workflow needed.
Here’s how to set it up step by step:
- Keep your Submit Access Request step. The create-access-request API is asynchronous, so the workflow moves on immediately after submitting. The response contains the access request ID inside the
newRequestsarray, specifically atnewRequests[0].accessRequestIds[0]. BothnewRequestsandaccessRequestIdsare arrays, so multiple identities or access items will produce multiple IDs. Grab that value, you’ll need it in step 3. - Add a Wait step, at least 1 minute. ISC needs time to process the request and generate the approval record from the Global Approval Policy. Without this, the approval won’t exist yet when you try to retrieve it.
- Add a Get Pending Access Requests step. Select the identity who currently owns that approval (e.g., the manager or access item owner defined in your Global Approval Policy) as the Reviewer, then apply this filter using the
accessRequestIdfrom step 1:accessRequestId eq "<your-access-request-id>". The list-pending-approvals endpoint supportsaccessRequestIdas a filter, so this pulls only the approval tied to your specific request instead of everything in the queue. - Add an Approve Access Request step. Use the Variable Selector to pass the
idfrom the first record returned in step 3. This is theapprovalId, which is different from theaccessRequestIdyou used to find it. TheaccessRequestIdidentifies the overall request, theapprovalIdidentifies the specific approval record you’re acting on.
If your Global Approval Policy has multiple levels (e.g., manager then governance group), repeat the Wait, Get Pending, Approve sequence for each level and select the appropriate reviewer for that level. The next level’s approval only gets created after the previous one is approved.
The identity performing the approval must either be the current approval owner or have the ORG_ADMIN user level. If the approval isn’t showing up when step 3 runs, increase the Wait duration and check the workflow execution logs.