Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/12/2022 01:15 PM
Hello All,
Kindly help us on the below use case.
Ex: FirstName+month+year(ramana112021)
\"${(user.firstname.concat(user.startdate.substring(5,7)).concat(user.startdate.substring(0,4)))}\" }",
Thanks,
Ramana
Solved! Go to Solution.
04/12/2022 02:45 PM
Hello Ramana,
Some of the sample example for the custom json passwords are below, Please use this as a reference to build your logic
"userpassword":"${user.firstname.substring(0,2)}${user.lastname.substring(0,2)}@${user.city.substring(0,3)}"
"userpassword":"${user.firstname.substring(0,1)}@${user.lastname.substring(0,1)}${user.username.toString().substring(2)}}"
Your example may translate to something like below
{${user.firstname}${user.startdate.substring(5,7)}${user.startdate.substring(0,4)}}
Regards,
Sagar Srikantaiah
Partner and Product Success
04/12/2022 02:45 PM
Dear Sagar,
Thanks for your suggestion and will update you soon.
Thanks,
Ramana
04/12/2022 02:45 PM
Hello All,
Kindly help me in that below error:
As suggested by Sagar, I have created json for password which is throghing error too long password
Test1: \"password\": \"${user.firstname}${user.startdate.substring(5,7)}${user.startdate.substring(0,4)}\"
Test2: \"password\": \"${user.firstname},${user.startdate.substring(5,7)},${user.startdate.substring(0,4)}\"
Test 3: \"password\": \"concat(${user.firstname},${user.startdate.substring(5,7)},${user.startdate.substring(0,4)})\"
for above all cases am getting same below error
04/12/2022 02:45 PM
Hi Ramana,
For a start you can set the logic in some other attribute and see what/how the password is getting generated.
Regards,
Avinash Chhetri
04/12/2022 02:45 PM
Hello Ramana,
The error message around password length is coming from Target application. Are we sending the password which is more than 64 characters ?
Did we tried setting password from Postman? Are we getting the similar error? Also try a password without date attribute.
Side Question : Is there a requirement to use custom password. Why not the OOTB password policy
\"password\": \"${arsTasks.password}\"
Regards,
Sagar Srikantaiah
Partner Success
04/12/2022 02:45 PM
Ramana,
I dont think you can use the substring function directly on the date object, you might have to convert that to a string before you can use it.
Test1: \"password\": \"${user.firstname}${user.startdate.toString().substring(5,7)}${user.startdate.toString().substring(0,4)}\"
Regards,
Avinash Chhetri
04/12/2022 02:45 PM
Thanks a lot Avinash
it is working fine as expected