# Using "Access Request Submitted" Event Trigger

**URL:** <https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521>\
**Category:** SHF Discussion and Questions\
**Created:** [May 10, 2021, 8:46pm UTC](https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521 "2021-05-10T20:46:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![justinrhaines](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/justinrhaines/32/16564_2.png) [@justinrhaines](https://developer.sailpoint.com/discuss/u/justinrhaines)\
**Post date:** [May 10, 2021, 8:46pm UTC](https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521/1 "2021-05-10T20:46:01Z")

</div>

Hi Folks–

I have some questions about the “Access Request Submitted” event trigger. I understand that this requires a response but I have a number of questions about that response.

- If the requested item doesn’t require any approvals, what kind of response should be sent?
- Can you explain the different kind of Response Types (Async, Sync, Specified by Integration) and how to use each one of them? My assumption is that Async means that the response can be sent not necessarily as the Event Trigger API/response itself, but separately. If that is the case, what API call would I make back to approve/deny the request (even if there are no approvals required on the request)?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![justinrhaines](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/justinrhaines/32/16564_2.png) [@justinrhaines](https://developer.sailpoint.com/discuss/u/justinrhaines)\
**Post date:** [May 10, 2021, 9:12pm UTC](https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521/2 "2021-05-10T21:12:11Z")

</div>

I found this helpful and am currently testing with this in mind!

[https://developer.sailpoint.com/triggers/Trigger\_Invocations.html#custom-application-response](https://developer.sailpoint.com/triggers/Trigger_Invocations.html#custom-application-response)

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [May 10, 2021, 9:29pm UTC](https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521/3 "2021-05-10T21:29:37Z")

</div>

Hey @justinrhaines thanks for posting this.

I see you have already found [https://developer.sailpoint.com/triggers/getting\_started.html](https://developer.sailpoint.com/triggers/getting_started.html). Take a look there and let us know if you have any additional question or hurdles that you need help overcoming. There are also some other resources still in Compass that be be helpful to review as well. for instance, [SaaS Solutions - Compass](https://community.sailpoint.com/t5/Admin-Help/Event-Triggers-in-SailPoint-s-Cloud-Services/ta-p/178285) has some helpful information and links.

---

<div class="post-metadata">

**Author:** ![justinrhaines](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/justinrhaines/32/16564_2.png) [@justinrhaines](https://developer.sailpoint.com/discuss/u/justinrhaines)\
**Post date:** [May 10, 2021, 10:14pm UTC](https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521/4 "2021-05-10T22:14:01Z")

</div>

Both websites were very helpful, but although I am getting the request and sending the response expected, my requests (with no approval required) are being denied. I have tried ASYNC with a response 200 and 202 as well as Specified by Integration with a response 200 and 202.

* * *

Request (webhook.site):

```auto
  "_metadata": {
    "callbackURL": "https://partner004.api.identitynow.com/beta/trigger-invocations/e493e495-c300-4c8e-ab54-f787a30e6687/complete",
    "responseMode": "dynamic",
    "secret": "a399b39d-cd70-4b54-893c-a1e2c328b497",
    "triggerId": "idn:access-request-pre-approval",
    "triggerType": "requestResponse"
  },...

```

Reponse Body (Content-type application/json):  
{}

* * *

* * *

POST (via Postman):  
[https://partner004.api.identitynow.com/beta/trigger-invocations/e493e495-c300-4c8e-ab54-f787a30e6687/complete](https://partner004.api.identitynow.com/beta/trigger-invocations/e493e495-c300-4c8e-ab54-f787a30e6687/complete)

BODY:

```auto
  "secret": "a399b39d-cd70-4b54-893c-a1e2c328b497",
  "output": {
    "approved": true
}
}

```

Response: 204 No Content

* * *

Can anyone provide me any pointers on what I might be missing here?

---

<div class="post-metadata">

**Author:** ![raine.ahmed](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@raine.ahmed](https://developer.sailpoint.com/discuss/u/raine.ahmed)\
**Post date:** [May 11, 2021, 9:52pm UTC](https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521/5 "2021-05-11T21:52:21Z")

</div>

Try updating the request body like this while completing the invocation:

```auto
{
    "secret": "a399b39d-cd70-4b54-893c-a1e2c328b497",
    "output": {
        "approved": true,
        "approver": "MyExternalIntegration",
        "comment": "Approved by MyExternalIntegration"
    }
}

```

---

<div class="post-metadata">

**Author:** ![justinrhaines](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/justinrhaines/32/16564_2.png) [@justinrhaines](https://developer.sailpoint.com/discuss/u/justinrhaines)\
**Post date:** [May 11, 2021, 9:59pm UTC](https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521/6 "2021-05-11T21:59:41Z")

</div>

Perfect, that was the trick.

The documentation ([Initiate a Trigger Test Invocation | Sailpoint API References](https://developer.sailpoint.com/triggers/Trigger_Invocations.html#custom-application-response)) should be updated to include that!

---

<div class="post-metadata">

**Author:** ![raine.ahmed](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@raine.ahmed](https://developer.sailpoint.com/discuss/u/raine.ahmed)\
**Post date:** [May 11, 2021, 10:30pm UTC](https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521/7 "2021-05-11T22:30:05Z")

</div>

Well, that documentation is generic and contains some example triggers. The `output` may vary depending on the schema of the trigger that is being used.

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [May 12, 2021, 2:18pm UTC](https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521/8 "2021-05-12T14:18:31Z")

</div>

@justinrhaines,

The correct request body to send back to the Access Request Submitted trigger can be found here: [https://developer.sailpoint.com/triggers/early-access-event-triggers/Access\_Request\_Preapproval.html#async](https://developer.sailpoint.com/triggers/early-access-event-triggers/Access_Request_Preapproval.html#async). As @raine.ahmed pointed out, the link you shared is generic, while this one is specific to Access Request Submitted.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 19, 2023, 2:21pm UTC](https://developer.sailpoint.com/discuss/t/using-access-request-submitted-event-trigger/521/9 "2023-07-19T14:21:51Z")

</div>


