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

Loop Multiple Manager Accounts while finding Manager DN while create/update AD

tejovempaty
New Contributor
New Contributor

We have 2 AD accounts for every single user - one being a privileged one and one being a standard one. Only difference to both these accounts is that we have "priv_" as prefix to the adm accounts. When manager account is being calculated, we currently have any of those 2 accounts and sometimes we get priv account shown as manager. Ideally, we want standard account to be assigned as manager. 

We have to loop between the AD Accounts that the user has, and return only the standard account as manager. Can we loop in the json something similar to this please?

 "manager": "${def managerValue = ''; managerAccount.each { account -> def comments = account?.comments ?: ''; if(!comments.contains('priv_')) { managerValue=comments; return;}}; return managerValue ?: '';}" }

 

1 REPLY 1

NM
Valued Contributor
Valued Contributor

Hi @tejovempaty , how are you assigning the manager? And how are you calculating it?