approvalIds Array is always Null for all completed access requests, although there is approvals related to the approved access request

Hi,

I am using the API /access-request-status to get all the completed access requests, but the approvalIds[] array in the response is always null for all completed access requests, although there are approvals related to the approved access request.

How can I join all the access request approvals related to an access request?
Best regards,

Onur

it is likely due to temporory object reference, you can see that in query events

What does it mean? Is the array always null? How can I see AccessRequest-Approval object relations in query events?

It appears that approvalIds can only be checked while the request is pending approval..

Hi @onbir

If you need all access requests completed with their approval information, you could use the API endpoint /access-request-administration. This should give the information about who approved the request and when.

The access request-request-status does contain the approval ids but once the approvals are processed, the ids will be gone and then we can not get the approval Id information anymore. I think this is expected behaviour only as i have also observed the same some time back in my tenant.

I hope this helps, please let me know if there needs more information.

Regards
Vikas.

Hi Vikas, thank you very much for sharing your experiences and inferences about approvalIds.

This API provides very useful information. Due to the experimental nature of the API, I have been hesitant to integrate it into productive reports.

1 Like

Hi @onbir

Yes, these are recently launched new APIs i think and believe they do allow us to even approve the requests on bahalf of other users if we have org_admin level PAT, so please keep a note of it as well.
For only reporting purpose i think /access-request-status should also work where in the key approvalDetails, you should be able to find the information about approvers. I am also using in my reports this end point only access-request-status for reporting. But i will leave the choice to you :).

Thank You.
Regards
Vikas.

1 Like