Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Getting Error while creating user account in AD with passing proxyAddresses with condition

biswajitoram
New Contributor III
New Contributor III

Hi Team,

We are getting errors while creating an Account in AD with passing proxyAddresses(SMTP values).

biswajitoram_0-1713275596317.png

Currently, we have achieved to pass proxyAddresses as below and it's working fine. But we want to implement this only for Thailand users.

"proxyAddresses": ["SMTP:${user.email.replace('@devglobal.abcd.org','@devabcd.abcd.co.th')}", "smtp:${user.email.replace('@devglobal.abcd.org','@devabcd.com')}"],

biswajitoram_2-1713276037091.png

biswajitoram_1-1713275711489.png

Requirement: We want to restrict the proxyAddresses as above only if user.country == Thailand. 

 

We tried to achieve this but have not gotten any results yet.

"proxyAddresses": "${if(user.country =='Thailand'){SMTP:${user.email.replace('@devglobal.abcd.org','@devabcd.abcd.co.th')},smtp:${user.email.replace('@devgabcd.abcd.org','@devabcd.com')}else{SMTP:${user.email.replace('@devglobal.abcd.org','@devabcd.abcd.org')},smtp:${user.email.replace('@devglobal.abcd.org','@devglobal.abcd.org')}")}}}",

 

Please help us to fix this issue ASAP.

[This message has been edited by moderator to mask sensitive info]

4 REPLIES 4

Saathvik
All-Star
All-Star

@biswajitoram : Try below JSON

 

"proxyAddresses": "${if(user.country =='Thailand'){'[\"SMTP:'+(user.email.replace('@devglobal.abcd.org','@devabcd.abcd.co.th'))+',smtp:'+(user.email.replace('@devgabcd.abcd.org','@devabcd.com'))+\"]}else{'[\"SMTP:'+(user.email.replace('@devglobal.abcd.org','@devabcd.abcd.org'))+',smtp:'+(user.email.replace('@devglobal.abcd.org','@devglobal.abcd.org'))+\"]}}"

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

rushikeshvartak
All-Star
All-Star

"proxyAddresses": "${if(user.country == 'Thailand') { SMTP:${user.email.replace('@devglobal.abcd.org','@devabcd.abcd.co.th')}, smtp:${user.email.replace('@devglobal.abcd.org','@devabcd.com')} } else { SMTP:${user.email.replace('@devglobal.abcd.org','@devglobal.abcd.org')}, smtp:${user.email.replace('@devglobal.abcd.org','@devglobal.abcd.org')} }}"


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

biswajitoram
New Contributor III
New Contributor III

Hi @rushikeshvartak @Saathvik 

Thanks for your support. I have tried both ways but still getting the issue.

However, I have come up with another logic and it worked as expected.

"proxyAddresses": [
"${if(user.country=='country') {'smtp:'+user.email.replace('@devglobal.abc.org', '@devabc.com')}}",
"${if(user.country=='country') {'SMTP:'+user.email.replace('@devglobal.abc.org', '@devabc.xyz.co.th')}}",
"${if(user.country=='country') {'smtp:'+user.email}}",
"${if(user.country=='country') {'SMTP:'+user.email}}"

Please click the 'Accept As Solution' button on the reply (or replies) that best answered your original question.


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.