Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Passing password parameter in DisableAcct JSON - REST

AbdulGaffar
New Contributor III
New Contributor III

Hi Team ,

We have a REST based application where the account shall be disabled , however we have to mandatorily pass the password parameter 
below is the JSON I have tried , please let me know if am missing anything 
we also have the password policy json , in the connection level 

Currently , we are facing error code 405

{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "URLHERE",
"httpMethod": "PUT",
"httpParams": "{\"authentication\":{\"id\":\"2\", \"type\":\"normal\"},\"email\":\"${user.email.toLowerCase()}\",\"enabled\":\"false\",\"login\":\"${endpoints.customproperty13=='YES'?('s'+user.username.substring(1,7)):arsTasks?.accountName}\",\"email\": \"${user.email.toLowerCase()}\", \"name\":\"${user.firstname+' '+user.lastname}\", \"role\": {\"id\": \"${entitlementValue.entitlement_value}\",\"name\": \"${entitlementValue.entitlement_name}\", \"active\": \"false\",\"password\": \"${password}\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,

405
]
}
}
]
}

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]



⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Amit_Malik
Valued Contributor II
Valued Contributor II

@AbdulGaffar , you can try

\"password\": \"'rAnD' ${(Math.abs(new Random().nextInt() % 999) + 1)} 'temporary'\"

Or

\"password\": \"'rAnD'+${(Math.abs(new Random().nextInt() % 999) + 1)} +'temporary'\"

 

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".

rushikeshvartak
All-Star
All-Star
{
  "call": [
    {
      "name": "call1",
      "connection": "acctAuth",
      "url": "URLHERE",
      "httpMethod": "PUT",
      "httpParams": "{\"authentication\":{\"id\":\"2\", \"type\":\"normal\"}, \"email\":\"${user.email.toLowerCase()}\", \"enabled\":\"false\", \"login\":\"${endpoints.customproperty13=='YES'?('s'+user.username.substring(1,7)):arsTasks?.accountName}\", \"name\":\"${user.firstname+' '+user.lastname}\", \"role\": {\"id\": \"${entitlementValue.entitlement_value}\", \"name\": \"${entitlementValue.entitlement_name}\", \"active\": \"false\", \"password\": \"${password}\"}}",
      "httpHeaders": {
        "Authorization": "${access_token}"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          201,
          200
        ]
      },
      "unsuccessResponses": {
        "statusCode": [
          400,
          401,
          403,
          404,
          405
        ]
      }
    }
  ]
}

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.