Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/18/2023 03:03 AM
Hi,
I am creating the connection for Active Directory, and set the follow ACCOUNTNAMERULE.
======
CN=${task.accountName},${if(user.companyname.equals('ALN'))
{"OU=ALT,DC=pn,DC=macnica,DC=co,DC=jp"}
else {"OU=${user.companyname},DC=pn,DC=macnica,DC=co,DC=jp"}}
======
For this rule, if user.companyname is ALN, then OU=ALT.
Otherwise, I want to move user ${OU=user.companyname} .
But it doesn't work.
It's a writing problem, can someone give me some advice?
///This is Provisioning error
===============
Checking DN for CN=IgaTest3,OU=${user.companyname},DC=pn,DC=macnica,DC=co,DC=jp.Not FOund DN for CN=IgaTest3,OU=${user.companyname},DC=pn,DC=macnica,DC=co,DC=jp. Error while creating account in AD - [LDAP: error code 32 - 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=pn,DC=macnica,DC=co,DC=jp' ] Error while creating account in AD - Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript17.groovy: 2: expecting '}', found ',' @ line 2, column 29. else {OU=${user.companyname},DC=pn,DC=macnica,DC=co,DC=jp} ^ 1 error Error while creating account in AD - Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript18.groovy: 2: expecting '}', found ',' @ line 2, column 28. else OU=${user.companyname},DC=pn,DC=macnica,DC=co,DC=jp ^ 1 error Error while creating account in AD - Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript19.groovy: 2: expecting '}', found ',' @ line 2, column 29. else {OU=${user.companyname},'DC=pn,DC=macnica,DC=co,DC=jp'} ^ 1 error Error while creating account in AD - Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript20.groovy: 2: unexpected char: '\' @ line 2, column 7. else {\"OU=${user.companyname},DC=pn,DC=macnica,DC=co,DC=jp\"}}"""); ^ 1 error Error while creating account in AD - Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript21.groovy: 2: unexpected char: '\' @ line 2, column 7. else {\"OU=${user.companyname},DC=pn,DC=macnica,DC=co,DC=jp\"}}"""); ^ 1 error
===============
Regards,
Solved! Go to Solution.
10/18/2023 03:58 AM - edited 10/18/2023 04:17 AM
@JPMac Could you please try with below samples
${if(user.companyname.equals('ALN'))
{'CN='+task.accountName+',OU=ALT,DC=pn,DC=macnica,DC=co,DC=jp'}
else{'CN='+task.accountName+',OU='+user.companyname+',DC=pn,DC=macnica,DC=co,DC=jp'}}
CN=${task.accountName},${if(user.companyname.equals('ALN'))
{'OU=ALT,DC=pn,DC=macnica,DC=co,DC=jp'}
else
{'OU='+user.companyname+',DC=pn,DC=macnica,DC=co,DC=jp'}
}
Refer Specifying the Account Name Rule section in below doc for more information.
Configuring the Integration for Provisioning and Deprovisioning Accounts (saviyntcloud.com)
If this reply answered your question, please Accept it As Solution to help others who may have a similar problem.