Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/26/2024 02:16 AM
I need to update a user's proxy addresses based on certain conditions at the user level. However, when I tried to update the proxy addresses using the JSON structure below, the email addresses were mistakenly passed as a single string at first index of a list instead of a seperate element of a list.
"proxyaddresses": {"Replace":["${if((user.email.contains('xxxxx')||user.customproperty8.contains('yyyyy'))&& task?.accountKey.customproperty56.contains('SMTP:' + user.username + '@xyz.org')){'SMTP:' + user.email + ',' + task?.accountKey.customproperty56.replace('SMTP','smtp')} else {if((user.email.contains('xxxxx')||user.customproperty8.contains('yyyyy'))&& task?.accountKey.customproperty56.contains('SMTP:' + user.email))
{task?.accountKey.customproperty56}else {if(task?.accountKey.customproperty56.contains('SMTP:' + user.email))
{task?.accountKey.customproperty56} else{'SMTP:' + user.email + ',' + task?.accountKey.customproperty56.replace('SMTP','smtp')}}}}"]},
So basically proxy address should be like below:
{
"proxyAddresses": ["email1@example.com", "email2@example.com"]
}
but the above JSON passsing the value like below:
{
"proxyAddresses": ["email1@example.com,email2@example.com"]
}
Solved! Go to Solution.
07/26/2024 08:26 AM
What ever the address you forming at the end you have to do
07/30/2024 06:03 AM
Thanks, Vivek. I modified the JSON as below, and now it's working perfectly:
"proxyaddresses": {"Replace":["${if((user.email.contains('xxxxx')||user.customproperty8.contains('yyyyy'))&& task?.accountKey.customproperty56.contains('SMTP:' + user.username + '@xyz.org')){('SMTP:' + user.email + ',' + task?.accountKey.customproperty56.replace('SMTP','smtp')).replaceAll(',','","')} else {if((user.email.contains('xxxxx')||user.customproperty8.contains('yyyyy'))&& task?.accountKey.customproperty56.contains('SMTP:' + user.email).replaceAll(',','","'))
{task?.accountKey.customproperty56}else {if(task?.accountKey.customproperty56.contains('SMTP:' + user.email))
{task?.accountKey.customproperty56.replaceAll(',','","')} else{('SMTP:' + user.email + ',' + task?.accountKey.customproperty56.replace('SMTP','smtp')).replaceAll(',','","')}}}}"]}
09/19/2024 01:57 PM
Thank you , this works