01/19/2023 12:57 PM
Hello,
I'm having some issues setting a custom password following a password formula with randompassword set to FALSE. Initially I was using the userPassword property to set a custom password using the below code which still set a random password
"userPassword": "${user?.lastname.charAt(0).toUpperCase() + user?.lastname.charAt(1).toLowerCase() + user?.customproperty63 + user?.username.substring(user?.username.length() - 3) + user?.customproperty64.substring(user?.customproperty64.length() -2)}"
I switched to using UnicodePwd instead of userPassword, which worked partially. It translated the first part of my password formula that grabs the first two letters of a users lastname and translated into numbers. For example, what should have translated to Si15220418 came out as 17715220418.
"UnicodePwd": "${user?.lastname.charAt(0).toUpperCase() + user?.lastname.charAt(1).toLowerCase() + user?.customproperty63 + user?.username.substring(user?.username.length() - 3) + user?.customproperty64.substring(user?.customproperty64.length() -2)}"
Any solution to this?
Thanks,
Aundre
Solved! Go to Solution.
01/19/2023 05:30 PM
Can you provide logic with examples what should be password
01/20/2023 05:36 AM
Check the original post, logic and example is there.
01/20/2023 12:18 PM - edited 01/20/2023 01:57 PM
"UnicodePwd": "${user?.lastname.substring(0, 1).toUpperCase() + user?.lastname.substring(1,2).toLowerCase() + user?.customproperty63 + user?.username.substring(user?.username.length() - 3) + user?.customproperty64.substring(user?.customproperty64.length() -2)}"
01/20/2023 01:55 PM
Just change index for last name from (0,1) to (1,2) in the JSON shared by Rushi to match your logic
03/23/2023 10:10 AM
is it working ..?