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

unable to create custom json password

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 3 2021 at 11:21 UTC

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

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.
7 REPLIES 7

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 3 2021 at 14:49 UTC


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



This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 5 2021 at 05:45 UTC

Dear Sagar,


Thanks for your suggestion and will update you soon.


Thanks,

Ramana

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 5 2021 at 06:09 UTC

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




image


This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 8 2021 at 17:09 UTC

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

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 8 2021 at 17:33 UTC

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



This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 9 2021 at 21:28 UTC

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

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 10 2021 at 08:07 UTC

Thanks a lot Avinash


it is working fine as expected



This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.