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

Reset password before deletion

IAM
Regular Contributor
Regular Contributor

I have everything set up but it doesn't seem that Saviynt is generating a password in the API call. It is just putting in "${randompassword}" in the body of the call.

 

2024-04-25T08:40:38-04:00-ecm-worker-2024-04-25T12:40:37.949025952Z stdout F 2024-04-25 12:40:37,948 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Task Response: {"call1":{"message":"Unrecognized token '$': was expecting ('true', 'false' or 'null')\n at [Source: ${randompassword}; line: 1, column: 2]","status":"Failed"}}
 
RemoveAccountJSON
 

 

 

{
  "call": [
    {
      "name": "call1",
      "connection": "acctAuth",
      "url": "https://www.domain.com/multipass/api/users/${account.accountID}/providerId",
      "httpMethod": "PUT",
      "httpParams": "\"${randompassword}\"",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Content-Type": "application/json"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          204
        ]
      }
    },
    {
      "name": "call2",
      "connection": "acctAuth",
      "url": "https://www.domain.com/multipass/api/administration/users/${account.accountID}",
      "httpMethod": "DELETE",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Content-Type": "application/json"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          204
        ]
      }
    }
  ]
}

 

 

 
PasswdPolicyJSON
 

 

 

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

 

 

20 REPLIES 20

Saathvik
All-Star
All-Star

@IAM : Use ${password} instead of ${randompassword} in JSON.


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

IAM
Regular Contributor
Regular Contributor

Looks like I was missing escaping quotes for the httpparams. But now I get this error message

call1":{"message":"Can not construct instance of java.util.LinkedHashMap: no String-argument constructor/factory method to deserialize from String value

@IAM : Please share your curl command from postman refer this to capture the curl command https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

IAM
Regular Contributor
Regular Contributor
curl --location --request PUT 'https://www.domain.com/multipass/api/users/f672b481-c8da-4f08-b24a-a258aa20b9f4/providerId' \
--header 'Authorization: Bearer eyJwbG50ciI6IkZ0ci9SOVJPU25TeXlfF35GSIsImFsZyI6IkVTMjU2In0.eyJzdWIiOiI3TkFFVGJCZ1JEdXB6UmRyR2Fzb0l3PT0iLCJqdGkiOiJHM3lSMWtpR1NMNlhBU0Ztb0g0amZ3PT0ifQ.wUiUjpy_nghWGiafxGBNkJn-g1kbjjTuKJZL4l_umgL3x0i1MQD2g$$%A6HBE1HvD9AzHZniA' \
--header 'Content-Type: application/json' \
--data '"testtttt12345"'

@IAM : Okay your JSON format looks good but as I mentioned before for random password use  ${password} instead of ${randompassword} in JSON. For rest connection ${randompassword} variable is not supported 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

IAM
Regular Contributor
Regular Contributor

So what I did just to test I set the httpparams to the below but still get that error message. I tried to replicate this in postman to try to get that same error message but I couldn't figure out what Saviynt is doing.

${account.accountID}

 

In Postman you are passing body in which format? I see some issue over there. Are you sending data in raw - JSON format?


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

IAM
Regular Contributor
Regular Contributor

Correct, screenshot below

IAM_0-1714060292322.png

 

@IAM : Change 

 

"Content-Type": "application/json"

 

to 

 

"Content-Type": "text/plain"

 

and see if that works. Because your body doesn't looks like a JSON format


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

IAM
Regular Contributor
Regular Contributor

Same issue ☹️

{
  "call": [
    {
      "name": "call1",
      "connection": "acctAuth",
      "url": "https://www.domain.com/multipass/api/users/${account.accountID}/providerId",
      "httpMethod": "PUT",
      "httpParams": "\"deleted ${account.accountID}\"",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Content-Type": "text/plain"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          204
        ]
      }
    },
    {
      "name": "call2",
      "connection": "acctAuth",
      "url": "https://www.domain.com/multipass/api/administration/users/${account.accountID}",
      "httpMethod": "DELETE",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Content-Type": "application/json"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          204
        ]
      }
    }
  ]
}

@IAM : For now can you hardcord the body and see if that works like below, 

{
  "call": [
    {
      "name": "call1",
      "connection": "acctAuth",
      "url": "https://www.domain.com/multipass/api/users/${account.accountID}/providerId",
      "httpMethod": "PUT",
      "httpParams": "\"deleted134b32\"",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Content-Type": "text/plain"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          204
        ]
      }
    },
    {
      "name": "call2",
      "connection": "acctAuth",
      "url": "https://www.domain.com/multipass/api/administration/users/${account.accountID}",
      "httpMethod": "DELETE",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Content-Type": "application/json"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          204
        ]
      }
    }
  ]
}

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

httpParams should be key value try below 

"key": "testtttt12345"


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

IAM
Regular Contributor
Regular Contributor

The application doesn't accept a key value pair though. It needs a value in the body

{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://www.domain.com/multipass/api/users/${account.accountID}/providerId",
"httpMethod": "PUT",
"httpParams": "\"testtttt12345\"",
"httpHeaders": {
"Authorization": "Bearer eyJwbG50ciI6IkZ0ci9SOVJPU25TeXlfF35GSIsImFsZyI6IkVTMjU2In0.eyJzdWIiOiI3TkFFVGJCZ1JEdXB6UmRyR2Fzb0l3PT0iLCJqdGkiOiJHM3lSMWtpR1NMNlhBU0Ztb0g0amZ3PT0ifQ.wUiUjpy_nghWGiafxGBNkJn-g1kbjjTuKJZL4l_umgL3x0i1MQD2g$$%A6HBE1HvD9AzHZniA",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
204
]
}
},
{
"name": "call2",
"connection": "acctAuth",
"url": "https://www.domain.com/multipass/api/administration/users/${account.accountID}",
"httpMethod": "DELETE",
"httpHeaders": {
"Authorization": "Bearer eyJwbG50ciI6IkZ0ci9SOVJPU25TeXlfF35GSIsImFsZyI6IkVTMjU2In0.eyJzdWIiOiI3TkFFVGJCZ1JEdXB6UmRyR2Fzb0l3PT0iLCJqdGkiOiJHM3lSMWtpR1NMNlhBU0Ztb0g0amZ3PT0ifQ.wUiUjpy_nghWGiafxGBNkJn-g1kbjjTuKJZL4l_umgL3x0i1MQD2g$$%A6HBE1HvD9AzHZniA",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
204
]
}
}
]
}

[This post has been edited by a Moderator to fix a formatting issue.]


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

IAM
Regular Contributor
Regular Contributor

@rushikeshvartak / @Saathvik 

I appreciate you both helping me thank you. I've tried everything you guys suggested but I still get the same error message.

 

{"call1":{"message":"Can not construct instance of java.util.LinkedHashMap: no String-argument constructor/factory method to deserialize from String value ('testtttt12345')\n at [Source: \"testtttt12345\"; line: 1, column: 1]","status":"Failed"}}

 

 

 

Please share logs in file 


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

IAM
Regular Contributor
Regular Contributor

Logs attached.

"ecm-worker","2024-04-29T13:01:57.585+00:00","2024-04-29T13:01:57.120360564Z stdout F 2024-04-29 13:01:57,120 [quartzScheduler_Worker-6] DEBUG rest.RestProvisioningService  - Task Response: {"auditDetails":{"call1":[{"message":"Can not construct instance of java.util.LinkedHashMap: no String-argument constructor/factory method to deserialize from String value ('testtttt12345')\n at [Source: \"testtttt12345\"; line: 1, column: 1]","status":"Failed"}]},"call1":{"message":"Can not construct instance of java.util.LinkedHashMap: no String-argument constructor/factory method to deserialize from String value ('testtttt12345')\n at [Source: \"testtttt12345\"; line: 1, column: 1]","status":"Failed"}}"

try like this 

{ "key": "testtttt12345" }


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

IAM
Regular Contributor
Regular Contributor
"call1":{"message":"No signature of method: com.saviynt.provisoning.rest.RestUtilService.getDynamicBindString() is applicable for argument types: (java.util.LinkedHashMap, java.util.HashMap) values: [[key:testtttt12345], [ServiceAccountOwnerMap:[:], ...]]\nPossible solutions: getDynamicBindString(java.lang.String, java.util.Map)","status":"Failed"}}

IAM
Regular Contributor
Regular Contributor

Hi @rushikeshvartak ,

Anything else I should try or should I open a ticket with Saviynt support?