Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Password reset for rehire case

rajeshg
New Contributor
New Contributor

Hi team,

We have use case to reset the password for rehire case while enabling the account. We have tried with the below JSONs but no luck.

Enable Account JSOn:

{
"USEDNFROMACCOUNT": "YES",
"MOVEDN": "YES",
"REMOVEGROUPS": "NO",
"ENABLEACCOUNTOU": "${if(user.employeeType!=null){if((user.employeeType.equals('Employee')) || (user.employeeType.equals('Non US Employee'))){ 'OU=Savi_Employee,OU=Saviynt_Test,OU=RSG,DC=rsgcorp,DC=local'}else if ((user.employeeType.equals('Contractor')) ||(user.employeeType.equals('Agency/Temp')) || (user.employeeType.equals('Intern')) ||(user.employeeType.equals('Non US Contractor')) ||(user.employeeType.equals('Non US Intern')) ||(user.employeeType.equals('Non US Agency/Temp'))) { 'OU=Savi_Contractor,OU=Saviynt_Test,OU=RSG,DC=rsgcorp,DC=local'}} else {'OU=Saviynt_Test,OU=RSG,DC=rsgcorp,DC=local'}}",
"msExchHideFromAddressLists": "FALSE",
"AFTERMOVEACTIONS": {
"userAccountControl": "512",
"password": "${if(user.customproperty65.equals('1') && user.customproperty47.equals('Rehire')){\"userPassword\":\"randomPassword\"} else {\"useraccountcontrol\":\"512\"}}",
"description": ""
}
}

enable account JSON

{
"USEDNFROMACCOUNT": "YES",
"MOVEDN": "YES",
"ENABLEACCOUNTOU": "XXXX",
"REMOVEGROUPS": "NO",
"AFTERMOVEACTIONS": {"{${if(user?.customproperty4=='Active'){\"userPassword\":\"randomPassword\"} else {\"useraccountcontrol\":\"512\"}}}",
"pwdLastSet": "0"}

}

 

Disable account JSON

{"deleteAllGroups":"No","moveUsertoOU":"XXXXX","userAccountControl":"514",
"AFTERMOVEACTIONS": {"{${if(user?.customproperty4=='Terminated'){\"Password\":\"randomPassword\"} else {\"useraccountcontrol\":\"514\"}}}",
"pwdLastSet": "-1"}

Regards,
Rajesh

Use == or equalsIgnoreCase
}

3 REPLIES 3

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @rajeshg 

Can you let me know if you have used directly instead of if else condition there , just pass  password as random password and try it out.

 

Thanks

Darshan

rajeshg
New Contributor
New Contributor

Hi @Darshanjain ,

Thanks for your response.

Our case is not to reset the password for users who are retrun from the leave. Password change is only for Rehire case.

Regards,
Rajesh

Hi @rajeshg 

I agree but i wanted to understand it worked or not, now if you dont want to test it out then you can check the logs to see what it is trying to pass while enabling and see password is being updated or not.

 

Thanks

Darshan