Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

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
Honored Contributor II
Honored Contributor II

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