# ISC Workflow jsonpath array becomes single object

**URL:** <https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804>\
**Category:** Bugs\
**Tags:** workflows, sailpoint-identity-security\
**Created:** [January 8, 2024, 1:46pm UTC](https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804 "2024-01-08T13:46:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelo\_mekenkamp](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/angelo_mekenkamp/32/3386_2.png) [@angelo\_mekenkamp](https://developer.sailpoint.com/discuss/u/angelo_mekenkamp)\
**Post date:** [January 8, 2024, 1:46pm UTC](https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804/1 "2024-01-08T13:46:29Z")

</div>

Hi all, 🙂

I noticed a bug in workflows. To show this bug, let’s take a simplified use case where we want workflows to send an email that displays the native identity of all disabled accounts of a specific source.

We start with the action Get Accounts and get all accounts from a specific source, then use the Send Email action. In the Send Email action, we use the templating context and define the variable disabledAccounts to be `$.getAccounts.accounts[?(@.disabled)]`.  
We then loop over the disabledAccounts in the body of the Send Email using apache velocity:

#if (${disabledAccounts}) The following accounts are disabled: #foreach ( $account in ${disabledAccounts})${account.nativeIdentity}, #end#else No accounts are disabled.#end

This usually works. `$.getAccounts.accounts[?(@.disabled)]` is a JSONPath expression and SailPoint refers in the [documentation](https://documentation.sailpoint.com/saas/help/workflows/workflow-basics.html#:~:text=The%20Variable%20Selector%20generates%20a%20JSONPath%20expression.%20You%20can%20learn%20more%20about%20the%20Goessner%20implementation%20of%20JSONPath%2C%20used%20in%20actions%20and%20operators%2C%20at%20goessner.net.) to the Goessner implementation of JSONPath.

According to [Goessner](https://documentation.sailpoint.com/saas/help/workflows/workflow-basics.html#:~:text=The%20Variable%20Selector%20generates%20a%20JSONPath%20expression.%20You%20can%20learn%20more%20about%20the%20Goessner%20implementation%20of%20JSONPath%2C%20used%20in%20actions%20and%20operators%2C%20at%20goessner.net.), this JSONPath expression will return an array of the objects, unless there is no match, in which case it might return false instead of an empty array.

However, the behavior of SailPoint here is different when only one account matches the filtering. It should, according to Goessner, give an array with one object in it, such that we can loop over this array of one object. Now, SailPoint returns the single object instead of the array. As a consequence, if we now loop over the results, it does not iterate over the array of one object and have one iteration where we can describe the account information. Instead, it loops over the attributes of the account.

This is causing issues to the workflow and we would as a workaround, build a special condition check to determine whether the object we iterate over contains accounts or account attributes.

I have contacted SailPoint Support about this (CS0259813) and as a response I hear that this is considered as an enhancement request rather than a bug description.

To me, If SailPoint documentation is saying that IdentityNow is behaving in a specific way, and it doesn’t, then ensuring that the system will behave this way is not an enhancement, but a bugfix, which should receive the correct priority.

Kind regards,  
Angelo

---

<div class="post-metadata">

**Author:** ![msurprenant](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@msurprenant](https://developer.sailpoint.com/discuss/u/msurprenant)\
**Post date:** [May 14, 2024, 2:23pm UTC](https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804/2 "2024-05-14T14:23:18Z")

</div>

Seconded, and think this issue might extend beyond workflows. I experienced it first hand using the REST API calls.

For example, if I call the list-accounts endpoint using PowerShell, being specific to a single identity (Documented here: [list-accounts | SailPoint Developer Community](https://developer.sailpoint.com/docs/api/v3/list-accounts)). Initially I expected a JSON hashtable (list) returned, I ran into an issue where even though I knew there was an identity with a single account, I wasn’t getting any return. Here’s my first iteration of the important part of the PowerShell function:

```auto
$response = Invoke-RestMethod "
https://$($IdentityNowConfiguration.orgName).api.identitynow.com/v3/accounts?filters=identityId%20eq%20`"$($profileID)`""
-Method 'GET' -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"}

return ($response | convertfrom-json -AsHashtable | ConvertTo-Json)

```

The “convertfrom-json -ashashtable” can’t convert the response if a single object is returned because it’s not returned in a hashtable/list. This caused me to write the function to return whatever the API gives me and then deal with the two potential type returns, which is not ideal. I would also prefer the implementation to match the Goessner standard.

---

<div class="post-metadata">

**Author:** ![angelo\_mekenkamp](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/angelo_mekenkamp/32/3386_2.png) [@angelo\_mekenkamp](https://developer.sailpoint.com/discuss/u/angelo_mekenkamp)\
**Post date:** [November 5, 2024, 1:35pm UTC](https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804/3 "2024-11-05T13:35:01Z")

</div>

This issue is unfortunately still existing.

---

<div class="post-metadata">

**Author:** ![nileshnikalje](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/nileshnikalje/32/24406_2.png) [@nileshnikalje](https://developer.sailpoint.com/discuss/u/nileshnikalje)\
**Post date:** [July 16, 2025, 9:44am UTC](https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804/4 "2025-07-16T09:44:13Z")

</div>

Have you found any workaround for this? I am facing the same exact issue

---

<div class="post-metadata">

**Author:** ![angelo\_mekenkamp](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/angelo_mekenkamp/32/3386_2.png) [@angelo\_mekenkamp](https://developer.sailpoint.com/discuss/u/angelo_mekenkamp)\
**Post date:** [July 16, 2025, 10:02am UTC](https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804/5 "2025-07-16T10:02:05Z")

</div>

Please reach out to your CSM @nileshnikalje , the more people who observe and report this issue, the higher the priority this would hopefully get by SailPoint to fix this directly, removing the need for everyone to build workarounds.

---

<div class="post-metadata">

**Author:** ![angelo\_mekenkamp](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/angelo_mekenkamp/32/3386_2.png) [@angelo\_mekenkamp](https://developer.sailpoint.com/discuss/u/angelo_mekenkamp)\
**Post date:** [July 16, 2025, 11:24am UTC](https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804/7 "2025-07-16T11:24:56Z")

</div>

Hi @SidharthDhev, if filtering results in one object and due to this issue it returns the object itself instead of an array of one object. Then how can you fetch the length of it?  
Aren’t you then calling the length method of the object itself rather than the length of the array?

---

<div class="post-metadata">

**Author:** ![SidharthDhev](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@SidharthDhev](https://developer.sailpoint.com/discuss/u/SidharthDhev)\
**Post date:** [September 4, 2025, 5:02pm UTC](https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804/8 "2025-09-04T17:02:46Z")

</div>

@angelo_mekenkamp

Apologies the query is misunderstood with a similar bug .

---

<div class="post-metadata">

**Author:** ![kachhruc](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@kachhruc](https://developer.sailpoint.com/discuss/u/kachhruc)\
**Post date:** [November 24, 2025, 12:36pm UTC](https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804/9 "2025-11-24T12:36:25Z")

</div>

> [@msurprenant](#):
>
> `esponse = Invoke-RestMethod "`

Has anyone found a workaround for this? I am facing the same issue.

---

<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:** [January 28, 2026, 8:26pm UTC](https://developer.sailpoint.com/discuss/t/isc-workflow-jsonpath-array-becomes-single-object/23804/11 "2026-01-28T20:26:55Z")

</div>

Closed on January 28, 2026, 8:26pm UTC


