How to find linkage between Access Request and Manual Task

Hello there,

I am working on a scenario where i have to forward a workitem to a specific user. Given that if the access request is submitted for a specific source entitlement.

Once the access request is approved, I am able to fetch the access request using “Access request status” API. However, the response does not contain the workitemId. So, it’s hard to find out which workItem I forward to the required user.

The manualWorkItemDetails section in the api response is attached below:

Appreiciate your help.

Thanks

Here is the API response containing manualWorkItem section:

Hello Shanti,

I don’t think currentOwner.id is the manual task/work item id. That value is only the identity id of the person who currently owns the manual work item. So for forwarding, we first need to find the actual work item id.

The way I would handle it is:

  1. Take the currentOwner.id from manualWorkItemDetails.
  2. Use it to get the owner’s pending work items:

GET /v2025/work-items?ownerId=<currentOwner.id>

  1. From the returned work items, identify the correct pending manual task by matching the requested user, requested access/source, account/native identity, and created time.
  2. Once you find the correct work item, use that work item’s id in the forward API:

POST /v2025/work-items/{id}/forward

So the linkage is not directly available as accessRequestId -> workItemId in the access request status response. We have to correlate it from the pending work items.

Also, if the same owner has multiple pending manual tasks, I would not forward only based on owner id. I would first read the work item details and make sure it is the exact task related to that access request.