Outbound mapping for a single valued attribute in Identity Cloud to multi valued field on Target

Hello Experts,

I am trying to configure an outbound mapping between Identity Cloud and IBM Tivoli LDAP. There are few fields in Identity Cloud which are single valued but target field on IBM Tivoli is multi valued. For example, “description” in Identity Cloud should be mapped to “description” on LDAP which is multi valued. Similarly, there is departmentNumber, telephone number…

I am looking for some example outbound mappings to map single field valued in Identity Cloud to multi valued field in Tivoli…

Hi Jitesh

Following is an example of a transformation script used to migrate multi-value attribute in the source (AD) to a multi-value attribute in ID Cloud. I saw it one of the blogs but cannot find the link for some reason.

I understand your requirement is slightly different, but you could use this as a reference.

------- Transformation Script Start -------
array_of_users = ;

for (let i = 0; i < source.length; i++) {

var parsedCN = source[i].split(‘,’);

var userCN = parsedCN[0].split(‘=’);

var memberQry = openidm.query(“managed/alpha_user”, {

“_queryFilter”: “userName eq '” + userCN[1] + “'”

});

if (memberQry.result.length === 1) {

 alphaUserID = { _ref : "managed/alpha_user/" + memberQry.result[0]._id}; 

 array_of_users.push(alphaUserID); 

}

}

array_of_users;

------- Transformation Script End -------

In the above script, value of source is read as an array and pushed into another multi-value attribute in ForgeRock.

Your script should be much simpler. For e.g.

------- Transformation Script Start -------

arrayTelephoneNumber = ;
arrayTelephoneNumber.push(source);
arrayTelephoneNumber;

------- Transformation Script End -------

In the above, I assume “source” contains the single telephone number value from ID Cloud and is pushed into an array (called arrayTelephoneNumber) to be sent to IBM LDAP.

Haven’t tried it myself but hope this will work.

2 Likes