and more in a single search tool across platforms. Read the announcement here. |
01/30/2024 04:38 AM - edited 01/30/2024 02:08 PM
Hello Team,
We have a requirement where if users employee type is IWT Contractor or IWT Full Time Employee and location is Remote then OU should be ( OU=IWT,OU=Remote,OU=Standard Users,OU=EUC_Test,DC=test,DC=com) otherwise OU should be (OU=Remote,OU=Standard Users,OU=EUC_Test,DC=test,DC=com)
THis is the logic used in AccountNameRule
CN=${if (user?.displayname != null && user?.displayname == '') {user?.displayname} else {user?.firstname + ' ' + user?.lastname}},OU=${if (user?.employeeType == 'IWT Contractor' || user?.employeeType == 'IWT Full Time Employee' || user?.location=='Remote') {'IWT,OU=Remote'} else if (user.customproperty44=='_Error'){'_Error'} else {user?.location + '_' + user?.locationnumber}},OU=Standard Users,OU=EUC_Test,DC=test,DC=com
Getting this error while trying with above logic
Checking DN for CN=Test usertw, OU=IWT,OU=Remote,OU=Standard Users,OU=EUC_Test,DC=ads-pipe,DC=com.Not FOund DN for CN=Test usertw, OU=IWT,OU=Remote,OU=Standard Users,OU=EUC_Test,DC=ads-pipe,DC=com. Error while creating account in AD - Invalid name: CN=Test usertw, OU=IWT,OU=Remote,OU=Standard Users,OU=EUC_Test,DC=test,DC=com
Please let us know if anything missing, Thanks in Advance
01/30/2024 06:32 AM
Does generated DN is correct?
01/30/2024 06:57 AM
Hi @rushikeshvartak ,
Yes the generated DN is correct
01/30/2024 06:53 AM
Hi @RCreddy
Issue might be because of the space coming in display name, can you try with one user without space in display name? If that's the issue, you can try to escape the space using replace function like below and check once.
{user?.displayname.replace(' ', '\\')}
01/30/2024 02:11 PM
01/30/2024 06:54 AM
@RCreddy What is the purpose of below condition?
as it's always executes the else part
(user?.displayname != null && user?.displayname == '')
01/30/2024 02:09 PM
Thanks for the reply, tried by removing the condition but failed with same error.
01/30/2024 02:11 PM