Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

UpdateAccountJSON using conditional branching

yuki
New Contributor III
New Contributor III

I would like to do the following.
I want to link the custom properties of the Saviynt user to the proxyAdress of the Active Directory.
There can be only one or multiple proxyAdress values to be linked.
Therefore, we have divided the conditions into those with “,” in the value and those without.
I have listed the following JSON in UpdateAccountJSON but an error is occurring.
I would like to know how to correct this.

【UpdateAccountJSON】
“${{if (user.customproperty2.contains(',')) {[user.customproperty2.toString().replace(','',"')]} else {user.customproperty2}}”

【CustomProperty2】
SMTP:1234@xxxx.co.jp,smtp:1234@xxxx.co.jp
SMTP:1234@xxxx.co.jp

3 REPLIES 3

Amit_Malik
Valued Contributor II
Valued Contributor II

“${user.customproperty2.contains(',')) ? user.customproperty2.replace(',','') : user.customproperty2}”

This is the format, data wise you need to need to check yourself. 

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".

yuki
New Contributor III
New Contributor III

I would like to know how this would work if it were applied.
“${user.customproperty2.contains(','')) ? user.customproperty2.replace(',','') : user.customproperty2}”

"${{user.customproperty2.contains(',') ? user.customproperty2.replace(',', "','") : user.customproperty2}}"


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.