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

CreateAccountdJSON Error

anuragtripathi
New Contributor II
New Contributor II

I was trying to pass the below paylog to create an account on a REST based application. However, the values are not replacing with actual values while sending constructing payload. It is directly sending ${user.email} as a value instead of replacing with actual user's email id.

 

{
"accountIdPath": "accountName",
"responseColsToPropsMap": {},
"call":[
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "https://XXXX/dev/uam/v1/users?",
"httpMethod": "POST",
"httpParams": "{\"email\":\"${user.email}\", \"username\":\"${user.username}\", \"status\":\"active\", \"displayName\":\"${user.displayName}\", \"firstName\":\"${user.firstname}\", \"lastName\":\"${user.lastname}\",\"opuName\":\"${requestAccessAttributes.get('dynOPUName')}\",\"permissions\":[{\"category\":\"Dashboard\",\"opuName\":\"AB\"}]}",
"httpHeaders": {
"x-api-key": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"description":"Created successfully!",
"code": 200
},
"unsuccessResponses": {
"statusCode": [
400,403,404,501
]
}
}
]
}

 

API Response:

{"call1":{"headers":"XXXXXXQ==","message":{"statusCode":400,"message":{"code":400,"description":"Email is invalid!"}},"statusCode":200,"description":null,"status":"Success"}}

3 REPLIES 3

NM
Honored Contributor III
Honored Contributor III

@anuragtripathi is the dynamic attribute name right?

Share attribute config.

Amit_Malik
Valued Contributor II
Valued Contributor II

@anuragtripathi , try this 

"httpParams": "{\"email\":\"${user.email}\", \"username\":\"${user.username}\", \"status\":\"active\", \"displayName\":\"${user.displayname}\", \"firstName\":\"${user.firstname}\", \"lastName\":\"${user.lastname}\",\"opuName\":\"${requestAccessAttributes.get('dynOPUName')}\",\"permissions\":[{\"category\":\"Dashboard\",\"opuName\":\"AB\"}]}"

displayName is not right format. It has to be all in lower case displayname.

This (${requestAccessAttributes.get('dynOPUName')}), I am assuming is correct. If after fixing the display name , it still doesnt work, we need to fix this most probably 

 

 

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
{
  "accountIdPath": "accountName",
  "responseColsToPropsMap": {},
  "call": [
    {
      "name": "call1",
      "connection": "acctAuth",
      "showResponse": true,
      "url": "https://XXXX/dev/uam/v1/users?",
      "httpMethod": "POST",
      "httpParams": "{\"email\":\"${user.email}\", \"username\":\"${user.username}\", \"status\":\"active\", \"displayName\":\"${user.displayName}\", \"firstName\":\"${user.firstname}\", \"lastName\":\"${user.lastname}\",\"opuName\":\"${requestAccessAttributes.get('dynOPUName')}\",\"permissions\":[{\"category\":\"Dashboard\",\"opuName\":\"AB\"}]}",
      "httpHeaders": {
        "x-api-key": "${access_token}"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "description": "Created successfully!",
        "code": 200
      },
      "unsuccessResponses": {
        "statusCode": [
          400,
          403,
          404,
          501
        ]
      }
    }
  ]
}

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