Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/18/2024 06:48 AM
Hello everyone,
I'm currently working on editing the createaccountjson for our Active Directory connector. The challenge I'm facing involves filtering and selecting the line manager's Active Directory account for newly created accounts. Specifically, I need to ensure that the line manager's account does not include the word 'admin'.
Whenever I attempt to modify the manager attributes code to enforce this condition, I encounter an error: "Error while creating account in AD - Failed to parse template script." However, reverting the manager attributes code to its previous state resolves the error and allows the account to be created, but it selects a manager account that includes 'admin'.
code snippet: "manager": "${managerAccount.each { acc -> def mngr = acc.comments !(mngr ?. contains('admin') || mngr == null | | mngr.trim() == '')? mngr :null} }",
Ps: The DN is stored in the acc.comments
06/18/2024 10:22 AM
"manager": "${ if (managerAccount == null || acc.comments.contains('admin')){''} else {managerAccount?.accountID} }"
06/19/2024 08:48 AM
Thanks for your reply, I tried that code snippet but It shows me ldap error code 21
06/18/2024 10:26 AM
"manager": "${managerAccount.find { acc -> acc.comments && !acc.comments.contains('admin') }?.comments}"
06/19/2024 08:47 AM
Thanks for your reply, I tried that code snippet but It's still showing the same error.