# Response Mapping's Attribute Path when JSON response is an array of strings?

**URL:** <https://developer.sailpoint.com/discuss/t/response-mappings-attribute-path-when-json-response-is-an-array-of-strings/148755>\
**Category:** SHF Discussion and Questions\
**Tags:** webservice-connector, sailpoint-identity-security\
**Created:** [June 26, 2025, 6:56pm UTC](https://developer.sailpoint.com/discuss/t/response-mappings-attribute-path-when-json-response-is-an-array-of-strings/148755 "2025-06-26T18:56:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ywomiloju](https://avatars.discourse-cdn.com/v4/letter/y/ea5d25/32.png) [@ywomiloju](https://developer.sailpoint.com/discuss/u/ywomiloju)\
**Post date:** [June 26, 2025, 6:56pm UTC](https://developer.sailpoint.com/discuss/t/response-mappings-attribute-path-when-json-response-is-an-array-of-strings/148755/1 "2025-06-26T18:56:44Z")

</div>

I am configuring the Web Services connector for an old IBM application, where the Rest API is a wrapper for command line commands. To load the accounts, I am able to get the User details by calling the /users endpoint. But I also need the user’s roles which is in the /userRoles endpoint. When I call the userRoles endpoint, child HTTP Operation, I get something like this [“admin”, “user”, “analyst”]. What can I set the attribute path to so that my roles attribute will have list of the roles.

My account schema has a roles attributes which is multivalued and is a string. (Schema attribute: roles)

I have tried setting the path to (without quotes): “.”, “\*”, “” (empty string is not allowed). Each time, when I look at the account’s roles attribute after successful aggregation, it is empty.

My response’s Root Path is set to blank.

---

<div class="post-metadata">

**Author:** ![MattUribe](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/matturibe/32/20300_2.png) [@MattUribe](https://developer.sailpoint.com/discuss/u/MattUribe)\
**Post date:** [June 26, 2025, 7:21pm UTC](https://developer.sailpoint.com/discuss/t/response-mappings-attribute-path-when-json-response-is-an-array-of-strings/148755/2 "2025-06-26T19:21:49Z")

</div>

If the API response is neither JSON nor XML, you will probably need to use an after operation rule.

In the response mapping, make sure to include your roles attribute, but the path doesn’t matter. In the rule, use the rawResponseObject (API response before any response mapping is applied) to update the value in the processedResponseObject (the data that ISC uses to populate the attributes).

The example in the documentation is already going in that exact direction and just needs to be updated for your specific case:

> **[Web Services After Operation Rule | SailPoint Developer Community](https://developer.sailpoint.com/docs/extensibility/rules/connector-rules/webservices-after-provisioning-rule)**
>
> This rule calculates attributes after a web-service operation call.

Matt

---

<div class="post-metadata">

**Author:** ![ywomiloju](https://avatars.discourse-cdn.com/v4/letter/y/ea5d25/32.png) [@ywomiloju](https://developer.sailpoint.com/discuss/u/ywomiloju)\
**Post date:** [June 27, 2025, 12:53pm UTC](https://developer.sailpoint.com/discuss/t/response-mappings-attribute-path-when-json-response-is-an-array-of-strings/148755/3 "2025-06-27T12:53:29Z")

</div>

The response is JSON.

Is it doable without the After Operation Rule?

---

<div class="post-metadata">

**Author:** ![MattUribe](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/matturibe/32/20300_2.png) [@MattUribe](https://developer.sailpoint.com/discuss/u/MattUribe)\
**Post date:** [June 27, 2025, 2:09pm UTC](https://developer.sailpoint.com/discuss/t/response-mappings-attribute-path-when-json-response-is-an-array-of-strings/148755/4 "2025-06-27T14:09:58Z")

</div>

If it is JSON, then yes, I would expect you could do this without a rule.

Can you share the full JSON response? (sanitized, of course)

---

<div class="post-metadata">

**Author:** ![TheOneAMSheriff](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@TheOneAMSheriff](https://developer.sailpoint.com/discuss/u/TheOneAMSheriff)\
**Post date:** [June 29, 2025, 3:40am UTC](https://developer.sailpoint.com/discuss/t/response-mappings-attribute-path-when-json-response-is-an-array-of-strings/148755/5 "2025-06-29T03:40:29Z")

</div>

Hi @ywomiloju,

Great question and welcome to the community!

When your **JSON response is an array of strings** and your target **schema attribute** is multivalued (e.g., `roles` as `type: STRING`, `multi: true`), you _can_ map this directly. The trick lies in the **Root Path** and **Attribute Path** configuration within the child HTTP operation.

Example: -

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/3/d/3d2ef17426af07cb2f4e467e303d06e0b5fde40e.png)  
 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/2/6/26889be5a90eb272616c9b10828076c0c915c323.png)  
Since the you mentioned the entire response is an array (not wrapped in a JSON object), you can use the below in **Root Path** and directly map roles in **Attribute Path** :

```auto
$ or $[*] or "$"

```

This tells SailPoint to take the full array and map it directly to the `roles` attribute on the account.

* * *

If you get a nested structure like below in response from the API:

```auto
{
  "userId": "1234",
  "roles": ["admin", "user", "analyst"]
}

```

Then also the above should work as you are mapping roles in **Attribute Path**.

If response is like:

```auto
{
  "roles": [
    { "name": "admin" },
    { "name": "user" }
  ]
}

```

You’d use a more specific **Root Path** :

```auto
$.roles[*]

```

* * *

Always **preview** the response from your endpoint in Postman when possible and verify what root element is returned. Usually`$` or `$[*]` works.

If aggregation still returns empty, double-check your **account schema** field `roles` is marked as `multi: true`.

Good luck mate.

---

<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:** [August 28, 2025, 3:41am UTC](https://developer.sailpoint.com/discuss/t/response-mappings-attribute-path-when-json-response-is-an-array-of-strings/148755/6 "2025-08-28T03:41:26Z")

</div>

Closed on August 28, 2025, 3:41am UTC

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