Fetching account details in Workflow

I have requirement that on last role deletion I have to disable account.
In the workflow, I am fetching accounts and putting below condition in compare string
but it is not working.

$.getAccounts.accounts[?(@.hasEntitlements == false)].source.name

Workflow is attached for reference.


CopyofTestDisable20240427.json (2.3 KB)

Hi @REKHASACH –

I would…

  1. Get all of the identity’s entitlements on that source account by using the “Get Access” action with a query parameter for source, or an “HTTP Request” action that calls beta/accounts/:id/entitlements.
  2. Use the “Is Valid” operator to check if the result of (1) is null

You may be able to achieve this via your current design, but if you can’t get that to work, I’ve been able to successfully use this alternate workflow design to meet your requirement.

Thanks,

Alex King

Thanks Alex.

But how can I get accounId, as per below article, filters are not allowed in HTTP url.

https://developer.sailpoint.com/discuss/t/support-for-inline-variable-for-http-request-url-field/6250/9

{{$.getAccount.getaccounts[?(@.sourceName=="CM")].id}}

If possible can you share your solution.

Hi @REKHASACH ,

What is the error are you facting? Are you unable to get results.
Try with sourceID instead of Sourcename
$.getAccounts.accounts[?(@.hasEntitlements == false)].sourceId

Thanks,
Siva.K

Hi Rekha,

This discussion may not have been updated but I believe this issue has been resolved. I was able to use inline variables in URLs in my workflows. Please give it a try.

Hi Sharvari,

I used variable step and stored filtered json Path values in variables.

I used that variable into URL

And it worked.

1 Like

I think that functionality has since been added. For example, here is some JSON code from an HTTP Request in one of my workflows which uses a filter:

        "Get App Account": {
            "actionId": "sp:http",
            "attributes": {
                "authenticationType": "OAuth",
                "method": "get",
                "oAuthClientId": "5ec4...",
                "oAuthClientSecret": "$.secrets.c426f...",
                "oAuthCredentialLocation": "oAuthInHeader",
                "oAuthTokenUrl": "https://tenant.api.identitynow.com/oauth/token",
                "requestContentType": "json",
                "url": "https://tenant.api.identitynow.com/v3/accounts",
                "urlParams": {
                    "filters": "identityId eq \"{{$.trigger.identity.id}}\" and sourceId eq \"089f179bda9sb1ag3238sa33\""
                }
            },
            "displayName": "",
            "nextStep": "Next Step",
            "type": "action",
            "versionNumber": 2
        }

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