Provisioning Completed workflow Filter

Hi,

I am working on Provisioning Completed workflow Filter. I like to filter mutiple values in attributeValue. Eg : Benefit Or Accounted Or Supply. Can someone help?

$.accountRequests[?(@.provisioningResult == ‘committed’ && @.provisioningTarget == ‘Mosaic ERP’ && ‘Remove’ in @.attributeRequests[ * ].operation && ‘Benefit’ in @.attributeRequests[ * ].attributeValue)]

{
    "input": {
        "_meta": {
            "invocationId": "03948517-d287-4c96-9a6a-1fe020f53011",
            "subscriptionId": "e4ebeaff-fe44-4d42-b6bc-02fd2568a3b5",
            "triggerType": "FIRE_AND_FORGET"
        },
        "accountRequests": [
            {
                "accountId": "18100007",
                "accountOperation": "Modify",
                "attributeRequests": [
                    {
                        "attributeName": "detectedRoles",
                        "attributeValue": "Benefit [AccessProfile-1694611746302]",
                        "operation": "Remove"
                    }
                ],
                "provisioningResult": "IdentityNow Task",
                "provisioningTarget": "IdentityNow",
                "source": {
                    "id": "IdentityNow",
                    "name": "IdentityNow",
                    "type": "SOURCE"
                },
                "ticketId": null
            },
            {
                "accountId": "05FE714236F34880E0634F69530A23A6",
                "accountOperation": "Modify",
                "attributeRequests": [
                    {
                        "attributeName": "Roles",
                        "attributeValue": "[7BB0F56BD426434B8254D03B0E79478B, 045F38D8D9654C968AE8ABD83BE7E4BC, 75A9213ACECD40CA984692F4573C07CF, BC5B0649586F4512B3DFDB16ED45EAC1, 67968CAC9B6B4D55B1C8828D65F91E49, 355BECFBC8184554B6E6F6C64E0724AE]",
                        "operation": "Remove"
                    }
                ],
                "provisioningResult": "committed",
                "provisioningTarget": "Mosaic ERP",
                "source": {
                    "id": "2c9180877d2a4e17017d2b022de90cd1",
                    "name": "Mosaic ERP",
                    "type": "SOURCE"
                },
                "ticketId": null
            }
        ],
        "action": "Access Request",
        "errors": [],
        "recipient": {
            "id": "ce3f650115214c598e07a26b4afd6adb",
            "name": "Cucu July Test",
            "type": "IDENTITY"
        },
        "requester": {
            "id": "",
            "name": "",
            "type": "IDENTITY"
        },
        "sources": "IdentityNow, Mosaic ERP",
        "trackingNumber": "316ba409c2e448e1aa09112cab490881",
        "warnings": []
    }
}

Hi @Manju22 ,

What is the filter are you looking for? Is it to detect - for which accounts, a for a certain list of Access profiles/attributeValues are removed successfully?

Hi Shailee,

If any access profile contains these values - “Benefit Or Accounted Or Supply” and if that being removed, we like to send email notification to another team.

So am looking to filter the attributeValues with OR condition.

attributeValues contains ‘Benefit’ Or ‘Accounted’

Hi @Manju22 ,

You can try -

attributeValue in [“Benefit”,“Accounted”]

This article will be helpful - Filtering Events | SailPoint Developer Community

Thanks

I tried using this and its not working.

Its works with single value but with mutiple values

Working : $.accountRequests[?(@.provisioningTarget == ‘IdentityNow’ && ‘Remove’ in @.attributeRequests[ * ].operation && ‘Accounts Receivable - Collections Agent [AccessProfile-1699376114497]’ in @.attributeRequests[ * ].attributeValue)]

Not working : $.accountRequests[?(@.provisioningTarget == ‘IdentityNow’ && ‘Remove’ in @.attributeRequests[ * ].operation && [‘Accounts Receivable - Credit Manager [AccessProfile-1699376365395]’,‘Accounts Receivable - Collections Agent [AccessProfile-1699376114497]’] in @.attributeRequests[ * ].attributeValue)]

the in operator doesn’t allow you to compare a list with a list. It compares a string with a list. Your second example won’t work. What you want to do instead is wrap the section where you use the in operator in parenthesis and use the OR operator (||) to check each case. The following JSONpath will make your second example work.

$.accountRequests[?(@.provisioningTarget == 'IdentityNow' && 'Remove' in @.attributeRequests[*].operation && ('Accounts Receivable - Collections Agent [AccessProfile-1699376114497]' in @.attributeRequests[*].attributeValue) || 'Accounts Receivable - Collections Agent [AccessProfile-1699376114497]' in @.attributeRequests[*].attributeValue)]

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.