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

Random Password Generation for Account Creation using Rest Connector

Bhargavi3
New Contributor
New Contributor

Hi Team, 

Our Reqirement is to generate random password while account creation in target application. We are able to pass hardcoded password value, but if we try to pass the password value by using binding variable as ${randompassword}. We are getting an error. 
We have created one password policy using regex expression and configured at security system level.

Bhargavi3_2-1714990501081.png

 

Bhargavi3_0-1714989882430.png

Please find the createaccountjson which we are using for random password generation.

{
"accountIdPath":"call1.message.data",
"dateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX",
"call":
[
{
"name":"call1",
"connection":"acctAuth",
"url":"****",
"httpMethod":"POST",
"httpParams":"{\"username\":\"${user.username}\",\"password\":\"${randompassword}\",\"sendRegistrationConfirmation\":true,\"person\":{\"type\":\"1\",\"status\":\"0\",\"details\":{\"gender\":\"0\",\"dateOfBirth\":\"1994-07-29T04:46:03.931Z\",\"nationality\": \"US\",\"residentCountry\":\"US\",\"passengerType\":\"ADT\",\"preferredCultureCode\":\"en-US\",\"preferredCurrencyCode\":\"SGD\"},\"name\":{\"first\":\"${user.firstname}\",\"middle\":\"${user.middlename}\",\"last\":\"${user.lastname}\",\"title\":\"MR\",\"suffix\":\"\"},\"emailAddresses\":[{\"email\":\"${user.customproperty8}\",\"default\":\"true\",\"type\":\"P\"}],\"phoneNumbers\":[{\"number\":\"1523555551\",\"type\":\"2\",\"default\":true}],\"addresses\":[{\"lineOne\":\"123 Fake Street\",\"lineTwo\":\"1234 Fake Street\",\"lineThree\":\"12345 Fake Street\",\"countryCode\":\"US\",\"provinceState\":\"UT\",\"city\":\"Faketon\",\"postalCode\":\"12345\",\"default\":true,\"addressTypeCode\":\"H\"}]}}",  
"httpHeaders":{
            "Authorization": "${accessToken}",
    "X-Api-Key":"%%"
 
         },
         "httpContentType":"application/json",
         "successResponses":{
            "statusCode":[
               200,
               201,
               204
            ]
         },
         "unsuccessResponses":{
            "statusCode":[
               400,
               403,
               401,
               409,
               501,
               500
            ]
         }
      }
   ]
}
Please find the logs for reference:
 
Bhargavi3_1-1714990403912.png

Could someone help us to resolve this issue?

Thanks,

Bhargavi Padaraju.

 

16 REPLIES 16

Bhargavi3
New Contributor
New Contributor

Hi @Raghu ,

I referred those docs and used the below passswrdpolicyJson and removed password ploicy from security system. I have used ${randompassword} variable. But did not work.
{
"minLength": 8,
"maxLength": 20,
"noOfCAPSAlpha": 3,
"noOfDigits": 2,
"noOfSplChars": 3
}

Please find the logs :

Bhargavi3_0-1714998686860.png

thanks,

Bhargavi.

 

NM
Regular Contributor III
Regular Contributor III

Hi @Bhargavi3, use ${password} instead of randompassword

Raghu
Valued Contributor III
Valued Contributor III

@Bhargavi3  try below

${account_password} and ${password} and ${randompassword}  This will work if you have configured PasswdPolicyJSON and email template use ${task.password}


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

it should be ${randomPassword}


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak , I tried but did not work.

Provisioning comments in pending tasks:

call1":{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}}

Hi @Raghu , I have used with three binding variables but still same error.

Provisioning comments :

call1":{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}}

PasswodpolicyJson which I am using is :

{
"minLength": 8,
"maxLength": 20,
"noOfCAPSAlpha": 3,
"noOfDigits": 2,
"noOfSplChars": 3
}

Any other way to make this works?

Thanks,

Bhargavi Padaraju.

Without password does your json works ?


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Raghu
Valued Contributor III
Valued Contributor III

@Bhargavi3  Connection not established correctly , pass hard code and test fst working or not?


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Bhargavi3
New Contributor
New Contributor

@rushikeshvartak Password is mandatory field. Without password field we will get 400 Bad request.

@Raghu , Its working fine with hardcoded value. Facing issue with binding variable.

Which approach do I need to follow? Should I create password policy with Regex condition and call it at security system or should I provide passpolicyJson from connector.

I tried with both scenarios but did not work.

Thanks,

Bhargavi Padaraju.

Bhargavi Padaraju.

Bhargavi3
New Contributor
New Contributor

Hi Team,

could someone please help me to resolve this issue?

Thanks,

Bhargavi Padaraju.

${password}

https://docs.saviyntcloud.com/bundle/Common-Troubleshooting-v24x/page/Content/Troubleshooting-Issues...


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

if not randompassword should work

rushikeshvartak_0-1715918983316.jpeg

https://forums.saviynt.com/t5/identity-governance/randompassword-in-rest-connector-creataccountjson-...


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak ,

Thanks for the reply. I tried with ${password},${randompassword},${Password},${randomPassword}. did not work. Please check my pwdpolicyJosn:

{
"minLength": 8,
"maxLength": 11,
"noOfCAPSAlpha": 1,
"noOfDigits": 3,
"noOfSplChars": 1
}

createaccjson:

Bhargavi3_0-1715922459415.png

 

am I missing any configuration pls let me know?

Thanks,

Bhargavi Padaraju.

Please share full connection page screenshot masking information 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Bhargavi3
New Contributor
New Contributor

Please find attached CreateAccjson:

Bhargavi3_1-1715928158254.png

 

Thanks,

Bhargavi Padaraju.

  • Remove password policy from security system
  • use ${randompassword}

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.