and more in a single search tool across platforms. Read the announcement here. |
05/09/2023 08:50 AM - edited 05/09/2023 08:52 AM
Hi,
How can we auto increment the distinguishedName in AD generated through the accountNameRule defined at AD connection object level in Saviynt. As per the documentation, I am trying the following :
${"CN=" + user.lastname.toUpperCase() + "(" + user.departmentname.toUpperCase() + ")" + "\\, " + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + "(Priv Account)" + ",OU=Users,DC=abc,DC=pqr,DC=xyz"}###${"CN=" + user.lastname.toUpperCase() + "(" + user.departmentname.toUpperCase() + "1)" + "\\, " + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + "(Priv Account)" + ",OU=Users,DC=abc,DC=pqr,DC=xyz"}###${"CN=" + user.lastname.toUpperCase() + "(" + user.departmentname.toUpperCase() + "2)" + "\\, " + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + "(Priv Account)" + ",OU=Users,DC=abc,DC=pqr,DC=xyz"}###${"CN=" + user.lastname.toUpperCase() + "(" + user.departmentname.toUpperCase() + "3)" + "\\, " + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + "(Priv Account)" + ",OU=Users,DC=abc,DC=pqr,DC=xyz"}###${"CN=" + user.lastname.toUpperCase() + "(" + user.departmentname.toUpperCase() + "4)" + "\\, " + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + "(Priv Account)" + ",OU=Users,DC=abc,DC=pqr,DC=xyz"}###${"CN=" + user.lastname.toUpperCase() + "(" + user.departmentname.toUpperCase() + "5)" + "\\, " + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + "(Priv Account)" + ",OU=Users,DC=abc,DC=pqr,DC=xyz"}
But it is not working. While the rule is not throwing any error, in the case of duplicity also it generates the distinguishedName according to the first statement in above rule. So, essentially a duplicate distinguishedName gets generated every time for the same first and last name.
Kindly assist.
Best Regards,
Varun
05/09/2023 09:52 AM
Please try below:
${'CN=' + user.lastname.toUpperCase() + '(' + user.departmentname.toUpperCase() + ')' + '\\, ' + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + '(Priv Account)' + ',OU=Users,DC=abc,DC=pqr,DC=xyz'}###${'CN=' + user.lastname.toUpperCase() + '(' + user.departmentname.toUpperCase() + '1)' + '\\, ' + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + '(Priv Account)' + ',OU=Users,DC=abc,DC=pqr,DC=xyz'}###${'CN=' + user.lastname.toUpperCase() + '(' + user.departmentname.toUpperCase() + '2)' + '\\, ' + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + '(Priv Account)' + ',OU=Users,DC=abc,DC=pqr,DC=xyz'}###${'CN=' + user.lastname.toUpperCase() + '(' + user.departmentname.toUpperCase() + '3)' + '\\, ' + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + '(Priv Account)' + ',OU=Users,DC=abc,DC=pqr,DC=xyz'}###${'CN=' + user.lastname.toUpperCase() + '(' + user.departmentname.toUpperCase() + '4)' + '\\, ' + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + '(Priv Account)' + ',OU=Users,DC=abc,DC=pqr,DC=xyz'}###${'CN=' + user.lastname.toUpperCase() + '(' + user.departmentname.toUpperCase() + '5)' + '\\, ' + user.firstname.substring(0, 1).toUpperCase() + user.firstname.substring(1) + '(Priv Account)' + ',OU=Users,DC=abc,DC=pqr,DC=xyz'}
05/09/2023 10:03 AM
@nimitdave - tried this already but it did not work. I was able to make it working by :
1. Changing the accountnamerule to the following :
CN=${user.lastname.toUpperCase()}(${user.departmentname.toUpperCase()})\\, ${user.firstname.substring(0,1).toUpperCase()}${user.firstname.substring(1)}(Priv Account),OU=Users,DC=abc,DC=pqr,DC=xyz###CN=${user.lastname.toUpperCase()}(${user.departmentname.toUpperCase()}1)\\, ${user.firstname.substring(0,1).toUpperCase()}${user.firstname.substring(1)}(Priv Account),OU=Users,DC=abc,DC=pqr,DC=xyz###CN=${user.lastname.toUpperCase()}(${user.departmentname.toUpperCase()}2)\\, ${user.firstname.substring(0,1).toUpperCase()}${user.firstname.substring(1)}(Priv Account),OU=Users,DC=abc,DC=pqr,DC=xyz
2. Setting the REUSEINACTIVEACCOUNT to FALSE.
But I think, the catch here was REUSEINACTIVEACCOUNT, the JSON which I used earlier as well as the one shared by you, both should work fine too.
Best Regards,
Varun