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

Move AD account from one OU to another when updating coutnry

ray
Regular Contributor
Regular Contributor

Hello,

i am using updateaccountjson to moveUsertoOU when the country of the user changes.

Can you anyone please identify the error?

this is what i am using : 

"moveUsertoOU": "${if (user.username.startsWith('EX'))
{'OU=Office,OU=Users,OU='+user.customproperty10+',OU=POC,
DC=fr,DC=xxx,DC=xxx'} else if(user.username.startsWith('SO'))
{'OU=SSO,OU =_ Global_Users,OU=POC,DC=fr,DC=xxx,DC=Icl'}else
{'OU=Wallix,OU =_ Global_Users,OU=POC,DC=fr,DC=xxx,DC=Icl'}}"

 

the error i am getting with this :

ray_0-1717586165994.png

Regards,

Ray

2 REPLIES 2

Raghu
All-Star
All-Star

@ray 

"moveUsertoOU": "${if (user?.username.startsWith('EX')?('EX'):'')
{'OU=Office,OU=Users,OU='+user.customproperty10+',OU=POC,DC=fr,DC=xxx,DC=xxx'}
else if(user?.username.startsWith('SO')){'OU=SSO,OU =_ Global_Users,OU=POC,DC=fr,DC=xxx,DC=Icl'} else {'OU=Wallix,OU =_ Global_Users,OU=POC,DC=fr,DC=xxx,DC=Icl'}}"

 

and

{
  "moveUsertoOU": "${user.username.startsWith('EX') ? 'OU=Office,OU=Users,OU=' + user.customproperty10 + ',OU=POC,DC=fr,DC=xxx,DC=xxx' : user.username.startsWith('SO') ? 'OU=SSO,OU=_Global_Users,OU=POC,DC=fr,DC=xxx,DC=Icl' : 'OU=Wallix,OU=_Global_Users,OU=POC,DC=fr,DC=xxx,DC=Icl'}"
}

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

rushikeshvartak
All-Star
All-Star

"moveUsertoOU": "${if (user.username.startsWith('EX'))
{'OU=Office,OU=Users,OU=' + user.customproperty10 + ',OU=POC,DC=fr,DC=xxx,DC=xxx'}
else if (user.username.startsWith('SO'))
{'OU=SSO,OU=_Global_Users,OU=POC,DC=fr,DC=xxx,DC=Icl'}
else
{'OU=Wallix,OU=_Global_Users,OU=POC,DC=fr,DC=xxx,DC=Icl'}}"


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