08/19/2023 02:46 AM
HI All,
We have requirement to disable users and move them to Specific OU when user is on LOA. we are trying below json in DISABLEACCOUNTJSON and using User update rule to trigger that.
The account is getting disabled in the target system but Account is not moved to specific OU, in saviynt we are getting
Kindly help us
DISABLEACCOUNTJSON:
{
"deleteAllGroups":"No",
"userAccountControl":"514",
"password": "${randomPassword}",
"moveUsertoOU":"${if(user.customproperty40.equals('LOA')){'OU=LOA,OU=XXXX Users,DC=XXXX,DC=LOCAL'}else if(user.statuskey==0){'OU=Disable Accounts,OU=XXXX Users,DC=XXXX,DC=LOCAL'}else{'OU=On Hold User Accounts,OU=XXXX Users,DC=XXXX,DC=LOCAL'}}"
}
08/19/2023 10:46 AM
Hi @sairamya15 ,
Any reason you are passing password while disabling the account. Can you try removing it?
08/20/2023 07:50 AM
Hi @pmahalle ,
We tried removing the password still the same.
08/19/2023 03:30 PM
LDAP Error Codes Document - https://docs.servicenow.com/en-US/bundle/vancouver-platform-security/page/administer/reference-pages...
LDAP: error code 80 - The password provided by the user did not match any password(s) stored in the user's entry Worker .
{
"deleteAllGroups":"No",
"userAccountControl":"514",
"moveUsertoOU":"${if(user.customproperty40.equals('LOA')){'OU=LOA,OU=XXXX Users,DC=XXXX,DC=LOCAL'}else if(user.statuskey==0){'OU=Disable Accounts,OU=XXXX Users,DC=XXXX,DC=LOCAL'}else{'OU=On Hold User Accounts,OU=XXXX Users,DC=XXXX,DC=LOCAL'}}"
}
08/20/2023 07:55 AM
Hi @rushikeshvartak,
Tried with and without passing password no luck.
Already we tested only else condition is working as expected.
when if or else if condition true move OU not working and pending tasks are stuck in queue.
08/20/2023 09:32 AM
08/21/2023 08:35 AM
08/24/2023 04:50 AM
Hi @ruqayyah , @rushikeshvartak
I have tried both ways the account is getting diabled but OU changes are not happening and Task remains pending.
08/24/2023 05:01 AM
Use terenery instead of if else
08/24/2023 07:24 AM
Can you help me with sample