Cancel pending access request for non-existing access profile

Hello Tomasz,

You have the correct API, POST /beta/access-requests/cancel

Can you confirm you are using the correct id when attempting to call the cancel API?

Below is an example from one of our test tenants.

To get access request items POST to /beta/access-request-status/

[{
    "name": "Engineering Role",
    "type": "ROLE",
    "cancelledRequestDetails": null,
    "errorMessages": null,
    "state": "EXECUTING",
    "approvalDetails": [],
    "manualWorkItemDetails": null,
    "accessRequestPhases": [{
        "started": "2021-10-22T20:54:26.023988Z",
        "finished": null,
        "name": "SOD_PHASE",
        "result": null,
        "state": "EXECUTING",
        "phaseReference": "sodViolationContext"
    }],
    "accountActivityItemId": "2c9180867ca8f73a017ca9c88eb22537",
    "requestType": "GRANT_ACCESS",
    "modified": "2021-10-22T20:54:26.085Z",
    "created": "2021-10-22T20:54:25.721Z",
    "requester": {
        "type": "IDENTITY",
        "id": "ff80818155fe8c080155fe8d925b0316",
        "name": "SailPoint Services"
    },
    "requestedFor": {
        "type": "IDENTITY",
        "id": "2c9180906fedeebe01701e0aa5e4140c",
        "name": "Aaron.Nichols"
    },
    "requesterComment": null,
    "sodViolationContext": null,
    "provisioningDetails": null,
    "preApprovalTriggerDetails": null,
    "description": "Access granted to all Engineering staff.",
    "removeDate": null,
    "cancelable": true,
    "accessRequestId": "7d9f7bb38db84168ae24c8a03b8cb3cf"
},
...
]

To cancel the access request you will POST to /beta/access-requests/cancel where accessRequestId == accountActivityId

{
  "accountActivityId": "7d9f7bb38db84168ae24c8a03b8cb3cf",
  "comment": "Cancelling this access"
}