Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/20/2022 12:31 AM
Solved! Go to Solution.
06/20/2022 08:06 AM - edited 06/20/2022 08:07 AM
You could try the sample shared below :
{
${if(user?.employeeclass.equals('Employee'))
'\"objectclass\" : [\"top\", \"person\", \"organizationalPerson\", \"ntUser\",\"inetOrgPerson\",\"hpPerson\",\"hpEmployee\"],
\"accountlock\" : \"False\",'
else
'\"objectclass\" : [\"top\", \"person\", \"organizationalPerson\", \"ntUser\",\"inetOrgPerson\",\"hpPerson\",\"hpContingentWorker\"],
\"accountlock\" : \"False\",'
}
"cn": "${user.displayname}",
"sn": "${user.lastname}",
"mail": "${user.email}",
"telephonenumber": "${user.phonenumber}"
}
Regards,
Avinash Chhetri
06/22/2022 05:08 AM
Hi Avinash,
The recommended JSON is throwing JSON Parse exception. Not able to rectify it as its expecting String Syntax. Could you please check and provide valid solution if possible.
Regards,
Prashanth.s.v
06/22/2022 06:48 AM - edited 06/22/2022 07:56 AM
Please copy the shared JSON in a an editor like a note pad before you add them in your connector.
If the issue still persists, please share the error logs from the Provisioning run.
Regards,
Avinash Chhetri
06/22/2022 10:05 PM
Hi Avinash,
The JSON is throwing parser exception in JSON Validator itself. Please find the screenshot.
Regards,
Prashanth.s.v
06/23/2022 07:11 AM
Thats fine, its not in a standard format hence. Please share the logs from the connector once you run the Provisining Jobs.
Regards,
Avinash Chhetri
06/23/2022 11:08 AM
{
Map map1 = new HashMap();
if (user.customproperty5 == 'Active') map1.put("objectclass", ['top', 'person', 'organizationalPerson', 'user']);
"cn": "${user.displayname}";
"sn": "${user.lastname}";
"mail": "${user.email}";
"telephonenumber": "${user.phonenumber}";
jsonBuilder = new groovy.json.JsonBuilder(map1);
return jsonBuilder.toString();
}
06/24/2022 06:05 AM
Hi Team,
We tried the below logic and its working fine now. Thanks Avinash and Rushikesh for your valuable help.
"objectClass": ${user.employeeclass=='Employee'?'[\"top\",\"person\",\"organizationalPerson\",\"ntUser\",\"inetOrgPerson\",\"hpPerson\",\"hpEmployee\"]':'[\"top\",\"person\",\"organizationalPerson\",\"ntUser\",\"inetOrgPerson\",\"hpPerson\",\"hpContingentWorker\"]'},
Regards,
Prashanth.s.v