Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/26/2024 07:58 AM
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
]
}
}
]
}
09/26/2024 08:09 AM
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.‼️‼️⚠️
09/26/2024 09:34 AM - edited 09/26/2024 09:35 AM
@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'\"
09/26/2024 09:51 AM
{
"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
]
}
}
]
}