Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/11/2024 12:44 AM
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"}}
10/11/2024 12:58 AM
@anuragtripathi is the dynamic attribute name right?
Share attribute config.
10/11/2024 01:32 AM
@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
10/11/2024 08:36 AM
{
"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
]
}
}
]
}