Hi folks , I am trying to filter the provisioning completed event trigger.
Requirement is :
Filter events which are from specific source, with Modify Account request, Add attribute request, specific role, the account request should be committed AND action should be “Access Request”.
I am able to achieve all other filtering apart from action because of the way json is structured. Sharing the json for provisioning trigger
{
"_metadata": {
"invocationId": "6a700aed-8c01-410b-9578-ef37958d7f5f",
"triggerId": "idn:post-provisioning",
"triggerType": "fireAndForget"
},
"accountRequests": [
{
"accountId": "123",
"accountOperation": "Modify",
"attributeRequests": [
{
"attributeName": "detectedRoles",
"attributeValue": "Signage - Zoom [AccessProfile-1675050307522]",
"operation": "Add"
}
],
"provisioningResult": "IdentityNow Task",
"provisioningTarget": "IdentityNow",
"source": {
"id": "IdentityNow",
"name": "IdentityNow",
"type": "SOURCE"
},
"ticketId": null
},
{
"accountId": "VkHJk3oMQLapAWC9kLUcYw",
"accountOperation": "Modify",
"attributeRequests": [
{
"attributeName": "role_id",
"attributeValue": "123",
"operation": "Add"
},
{
"attributeName": "email",
"attributeValue": "[email protected]",
"operation": "Add"
},
{
"attributeName": "first_name",
"attributeValue": "abc",
"operation": "Add"
},
{
"attributeName": "last_name",
"attributeValue": "abc",
"operation": "Add"
}
],
"provisioningResult": "committed",
"provisioningTarget": "Zoom",
"source": {
"id": "123",
"name": "Zoom",
"type": "SOURCE"
},
"ticketId": null
}
],
"action": "Access Request",
"errors": [],
"recipient": {
"id": "123",
"name": "Abc",
"type": "IDENTITY"
},
"requester": {
"id": "abc",
"name": "1002",
"type": "IDENTITY"
},
"sources": "Zoom, IdentityNow",
"trackingNumber": "abc",
"warnings": []
}
and the filter which is working fine without action filter.
$.accountRequests[?(@.source.id == "abc" && @.provisioningResult == "committed" && @.accountOperation == "Modify")].attributeRequests[?(@.attributeName == "role_id" && @.operation == "Add" && @.attributeValue == "abc")]
Some of the values are randomly replaced but the filter is working fine.
How do I add action=“Access Request” along with above filter.
Single filter on action is working fine which is below:
$[?(@.action == 'Access Request']