# WebService response combine multiple attributes under 1 identitiy

**URL:** <https://developer.sailpoint.com/discuss/t/webservice-response-combine-multiple-attributes-under-1-identitiy/102269>\
**Category:** SHF Discussion and Questions\
**Tags:** sailpoint-identity-security\
**Created:** [February 26, 2025, 12:32am UTC](https://developer.sailpoint.com/discuss/t/webservice-response-combine-multiple-attributes-under-1-identitiy/102269 "2025-02-26T00:32:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![P96337](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/p96337/32/3351_2.png) [@P96337](https://developer.sailpoint.com/discuss/u/P96337)\
**Post date:** [February 26, 2025, 12:32am UTC](https://developer.sailpoint.com/discuss/t/webservice-response-combine-multiple-attributes-under-1-identitiy/102269/1 "2025-02-26T00:32:11Z")

</div>

Hi Team,

Running into a little obstacle with a WebServices Connector. I have two sources I am pulling from. I am seeing the attributes pull in but in ISC some of the attributes are collecting under 1 identity. It works well in Postman but in ISC it does not do as expected. See attached example and the attached responses from postman. DO you think a WS Provisioning Rule will be needed?

I see this error on some identities

`trackingId: 2f75ee4dbf844bd78309aa4f23f59e60 RuleExecutionException (ruleName=MDStaff Correlation): BSFException: BeanShell script error: Sourced file: inline evaluation of: `` import org.apache.commons.lang.StringUtils; import sailpoint.object.*; M . . . '' : Typed variable declaration : illegal use of null value or 'null' literal : at Line: 8 : in file: inline evaluation of: `` import org.apache.commons.lang.StringUtils; import sailpoint.object.*; M . . . '' : ; BSF info: MDStaff Correlation at line: 0 column: columnNo, caused by org.apache.bsf.BSFException: BeanShell script error: Sourced file: inline evaluation of: `` import org.apache.commons.lang.StringUtils; import sailpoint.object.*; M . . . '' : Typed variable declaration : illegal use of null value or 'null' literal : at Line: 8 : in file: inline evaluation of: `` import org.apache.commons.lang.StringUtils; import sailpoint.object.*; M . . . '' : ; BSF info: MDStaff Correlation at line: 0 column: columnNo`

[response.json](https://developer.sailpoint.com/discuss/uploads/short-url/ecMbbJ3QWWoEMQzLxSf3Q4YaTkJ.json) (275.7 KB)  
[Demographic.json](https://developer.sailpoint.com/discuss/uploads/short-url/2RilyPgdqrMgS5wxUhgCtZZlZdb.json) (571 Bytes)

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/1/a/1af311f52da423d5d4ae7798ccd279d71049e079.png)

---

<div class="post-metadata">

**Author:** ![WhiteBat](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/whitebat/32/22171_2.png) [@WhiteBat](https://developer.sailpoint.com/discuss/u/WhiteBat)\
**Post date:** [February 26, 2025, 11:01am UTC](https://developer.sailpoint.com/discuss/t/webservice-response-combine-multiple-attributes-under-1-identitiy/102269/2 "2025-02-26T11:01:05Z")

</div>

Hello @P96337,

From the looks of it, you’re using a secondary API call to load the user data. The issue could be in the way you configured the second API call, so you might need to share the child HTTP Operation or the rule you’re using to load the additional data.

---

<div class="post-metadata">

**Author:** ![P96337](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/p96337/32/3351_2.png) [@P96337](https://developer.sailpoint.com/discuss/u/P96337)\
**Post date:** [February 26, 2025, 12:29pm UTC](https://developer.sailpoint.com/discuss/t/webservice-response-combine-multiple-attributes-under-1-identitiy/102269/3 "2025-02-26T12:29:05Z")

</div>

Hi Anaas,

Thanks for chiming in. Yes there are two API calls being used to pull the data from 2 sources - the Appointment and Demographic source. These responses work in Postman with the attributes but not in ISC. The Aggregations are composed of Parent and Child. Here are the HTTP Ops being used.

[HTTP Ops.txt](https://developer.sailpoint.com/discuss/uploads/short-url/uyKjmrTXpUPmSEtnrw26VqCof2D.txt) (9.2 KB)

and a Correlation rule correlates identities based on a combination of the **last 4 digits of the SSN** and the **Last Name** of the account

`"script": "\n import org.apache.commons.lang.StringUtils;\n import sailpoint.object.*;\n\n Map returnMap = new HashMap();\n\n //using last 4 digits of SSN appended with Last Name as a correlation attribute\n String mdSsnLast = StringUtils.substring(account.getStringAttribute(\"SSN\"), -4) + account.getStringAttribute(\"LastName\");\n\n returnMap.put( \"identityAttributeName\", \"mdstaffSsnLast\");\n returnMap.put( \"identityAttributeValue\", mdSsnLast);\n\n return returnMap;\n\n "`

---

<div class="post-metadata">

**Author:** ![WhiteBat](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/whitebat/32/22171_2.png) [@WhiteBat](https://developer.sailpoint.com/discuss/u/WhiteBat)\
**Post date:** [February 26, 2025, 1:24pm UTC](https://developer.sailpoint.com/discuss/t/webservice-response-combine-multiple-attributes-under-1-identitiy/102269/4 "2025-02-26T13:24:46Z")

</div>

Hello back,

Ideally when working with child endpoint the data should be [returned of a single object](https://documentation.sailpoint.com/connectors/webservices/help/integrating_webservices/json_aggregation.html).

Do you have an API that you can call to filter user ?

Something like

```auto
{
  "source": "Appointment",
  "filter": "PeopleSoftID eq '57160'", ⬅️⬅️⬅️
  "fields": [
    "AppointmentID",
    "Archived",
    "IDNumber",
    "OnStaff",
    "PeopleSoftID",
    "OtherID",
    "ProviderID"
  ],
  "sort": [
    {
      "ProviderID": "asc"
    }
  ],
  "settings": {
    "IncludeArchivedProviders": false,
    "IncludeApplicants": true
  },
  "resultsperpage": 500,
  "page": 1
}

```

If you do, change the value of the filter to` $response.PeopleSoftID$` and then use it in both your child endpoints.

If you don’t have one, you might try to add filtering on the rule.

Side note: I’m wondering if you can add variables in the root path. Something like `$.[?(@.PeopleSoftID=="$response.PeopleSoftID$")]` 🤔

Edit : for your correlation rule, you might want to add an import for the map.

```auto
import java.util.HashMap;
import java.util.Map;

```

---

<div class="post-metadata">

**Author:** ![P96337](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/p96337/32/3351_2.png) [@P96337](https://developer.sailpoint.com/discuss/u/P96337)\
**Post date:** [February 26, 2025, 8:50pm UTC](https://developer.sailpoint.com/discuss/t/webservice-response-combine-multiple-attributes-under-1-identitiy/102269/5 "2025-02-26T20:50:53Z")

</div>

Looks like I am able to pull a single user with a GET call using the ProviderID in Postman. The Demographip attributes are not in the single call. All the attributes are in the Appointment source. The PeoplesofyID shows to be a custom field not listed in the single account endpoint response…

[response (2).json](https://developer.sailpoint.com/discuss/uploads/short-url/pH8FJ3v6Qc3ldNAerU7E0yCifC0.json) (179.1 KB)

---

<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:** [April 27, 2025, 8:51pm UTC](https://developer.sailpoint.com/discuss/t/webservice-response-combine-multiple-attributes-under-1-identitiy/102269/6 "2025-04-27T20:51:37Z")

</div>

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