Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/05/2024 01:33 PM
Hello,
We have configured REST Connector, it works fine for creation.
When we configure UpdateAccountJSON, we need two calls, first call to get the account data, second call will use the data from first call if we cannot get it from requestAttributes object.
The first call return account data like below. how can I get the value of email, departements respectively and set it in second call of attribute setting? I did it as below but does not work:
\"email\": \"${response.call1.message.status?.data[0].email}\",
\"departments\": [${'\"' + response.call1.message.status?.data.departments?.toString().replace('[','').replace(']','').replace(',','\",\"') +'\"'}],
{
"status": {
"data": [
{
"id": "13001",
"first_name": "fname1",
"last_name": "sname1",
"username": "login1",
"email": "login1@mycompany.com",
"location": "City, State",
"type": "account type",
"status": "Active",
"departments": [
"dept1", "dept2"
],
"groups": [
"Group2OfDept1","Group3OfDept2"
]
}
]
}
}
Thanks
09/05/2024 01:34 PM
09/05/2024 02:22 PM
Hello Rushikesh, Thanks for your help.
Attached is the AddAccess JSON file (testing purpose) since we don't have dedicated add access API, we use update user API for Add Access.
The departments attribute is an array/list attribute, its setting have issues. you can check log file with Unrecognized token error.
However, even we remove this attribute, other attributes setting is OK, the request sent to backend server. but it respond with email value error, location error, password error etc. so it means their settings did not get actual value from first API call. it would be great if you show how to get departments attribute and other attributes setup correctly, the first call response is in log file as well, you can see the data structure by search "Group1"
Thanks for your review!