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

Restrict Update Account for Admin AD account.

PuspanjaliM
New Contributor II
New Contributor II

Hi team,

We have a requirement that Saviynt should provision tasks related to personal accounts.

So we set up the below logic to restrict the provision for the admin account, which is working fine.

As we are expecting, Saviynt is only completing tasks for the personal account and throwing an error for the admin account.

{${if(task.accountName.startsWith('mfladm')) 'xx'
else'\"manager\" : \"'+managerAccount.comments+'\",
\"title\" : \"'+user.customproperty31+'\",
\"department\" : \"'+user.locationdesc+'\"'}}

But, I need to add 2 more attributes (display name and moveUsertoOU) to the ELSE part of the above update JSON.

Those 2 attributes also have some IF ELSE logic, as below, which we were using previously.

"displayname": ${((user.customproperty55 != null) && (user.customproperty55 != ''))? '\"'+user.customproperty55+'\"':'\"'+user.displayname+'\"'},
"moveUsertoOU": "${if(user.customproperty36=='NewHire') {'OU=Users,OU=PROD,OU=Windows10,DC=mfl,DC=co,DC=uk'} else if(user.employeeType=='Harlow') {'OU=External,OU=User,OU=Accounts,DC=mfl,DC=co,DC=uk'} else {''}}",

Could the team help me to know how I can add "display name and moveUsertoOU" to the JSON with IF ELSE?

I used this document to add the IF ELSE logic on update Account

https://docs.saviyntcloud.com/bundle/AD-v2021x/page/Content/Configuring-the-Integration-for-Provisio...

 

 

1 REPLY 1

rushikeshvartak
All-Star
All-Star

{
${if(task.accountName.startsWith('mfladm'))
'xx'
else
'\"manager\" : \"'+managerAccount.comments+'\", \"title\" : \"'+user.customproperty31+'\", \"department\" : \"'+user.locationdesc+'\", \"displayname\" : '+
${((user.customproperty55 != null) && (user.customproperty55 != ''))? '\"'+user.customproperty55+'\"':'\"'+user.displayname+'\"'}+
', \"moveUsertoOU\" : \"'+
${if(user.customproperty36=='NewHire')
'OU=Users,OU=PROD,OU=Windows10,DC=mfl,DC=co,DC=uk'
else if(user.employeeType=='Harlow')
'OU=External,OU=User,OU=Accounts,DC=mfl,DC=co,DC=uk'
else
''}+'\"'
}
}


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