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

CheckForUnique not working as expected

sdey_2023
Regular Contributor
Regular Contributor

We have a logic defined in the CheckForUnique ADSI connector to check for the uniqueness of UserPrincipalName during provisioning. But it is failing to provision the account of a User throwing UPN already Exists error although as per the logic defined it should append 1 and provision.

I have checked couple of other posts where Users have reported of similar issue being faced. Can you confirm if this is a bug with Saviynt?

We are using the below code for the UPN uniqueness check and generation but if there is a User with same firstname and lastname and CP45 as O for both, it is failing.

CheckForUnique Code Snippet:

{
"userprincipalname": "CUSTOMPROPERTY3",
"RuleCheck": "${if((user.customproperty45!='O' || user.customproperty45 == null) && user.employeeType== 'Employee' ) {user.email.substring(0,user.email.indexOf('@')) + '@abc.com'} else if ((user.customproperty45!='O' || user.customproperty45 == null) && user.employeeType== 'External' ) {user.email.substring(0,user.email.indexOf('@')) + '@contractor.abc.com'} else if(user.customproperty45=='O' && user?.email == null && user?.firstname!=null && user?.lastname!=null) {user.firstname + '.' + user.lastname + '@contractor.abc.com'} else if(user.customproperty45=='O' && user?.email == null && user?.firstname==null && user?.lastname!=null) {user.lastname + '@contractor.abc.com'} else if(user.customproperty45=='O' && user?.email == null && user?.firstname!=null && user?.lastname==null) {user.firstname + '@contractor.abc.com'} else if(user?.email.contains('cognizant') || user?.email.contains('accenture')) {user.customproperty2.substring(1) + '@qa.abcqa.local'}}###${if((user.customproperty45!='O' || user.customproperty45 == null) && user.employeeType== 'Employee' ) {user.email.substring(0,user.email.indexOf('@')) + '1@abc.com'} else if ((user.customproperty45!='O' || user.customproperty45 == null) && user.employeeType== 'External' ) {user.email.substring(0,user.email.indexOf('@')) + '1@contractor.abc.com'} else if(user.customproperty45=='O' && user?.email == null && user?.firstname!=null && user?.lastname!=null) {user.firstname + '.' + user.lastname + '1@contractor.abc.com'} else if(user.customproperty45=='O' && user?.email == null && user?.firstname==null && user?.lastname!=null) {user.lastname + '1@contractor.abc.com'} else if(user.customproperty45=='O' && user?.email == null && user?.firstname!=null && user?.lastname==null) {user.firstname + '1@contractor.abc.com'} else if(user?.email.contains('xyz') || user?.email.contains('def')) {user.customproperty2.substring(1) + '@qa.abcqa.local'}}"
}

1 REPLY 1

rushikeshvartak
All-Star
All-Star

Did you validated code in v24.x version ?


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.