Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/12/2024 01:06 AM
Hello,
I have the following requirements:
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://ABC.com/scim/v2/Users/${account.accountID}",
"httpMethod": "PUT",
"httpContentType": "application/json",
"httpParams": "{\"userName\": \"${user.customproperty1}\",\"name\": {\"givenName\": \"${user.firstname}\",\"familyName\": \"${user.lastname}\"},\"emails\": [{\"primary\": \"true\",\"value\": \"${user.email}\",\"type\": \"work\"}],\"displayName\": \"${user.displayname}\",\"locale\": \"en\",\"timezone\": \"${user.city}\",\"title\": \"${user.title}\",\"addresses\": [{\"type\": \"work\",\"primary\": \"true\",\"value\": \"${user.street}, ${user.city}\"}]}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
204
]
}
},
{
"name": "call2",
"connection": "acctAuth",
"url": "https://ABC.com/scim/v2/Users/${account.accountID}",
"httpMethod": "PATCH",
"httpContentType": "application/json",
"httpParams": "{\"Operations\": [{\"op\": \"replace\",\"value\": {\"userType\": \"${requestAccessAttributes.get('RoleAccess') == 'IT admin' ? '1346' : (requestAccessAttributes.get('RoleAccess') == 'IT viewer' ? '1312' : requestAccessAttributes.get('RoleAccess'))}\"}}]}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
204
]
}
}
]
}
Solved! Go to Solution.
07/12/2024 02:31 AM
Try this @mgandr
{
"name": "call2",
"connection": "acctAuth",
"url": "${(arsTasks.source=='Request')?'https://ABC.com/scim/v2/Users/account.accountID':''}"
"httpMethod": "PATCH",
"httpContentType": "application/json",
"httpParams": "{\"Operations\": [{\"op\": \"replace\",\"value\": {\"userType\": \"${requestAccessAttributes.get('RoleAccess') == 'IT admin' ? '1346' : (requestAccessAttributes.get('RoleAccess') == 'IT viewer' ? '1312' : requestAccessAttributes.get('RoleAccess'))}\"}}]}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
204
]
}
}
]
}
07/12/2024 08:26 AM
Use callcondition
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"callCondition": "${arstasksObj?.source == 'REQUEST'}",
"url": "https://ABC.com/scim/v2/Users/${account.accountID}",
"httpMethod": "PUT",
"httpContentType": "application/json",
"httpParams": "{\"userName\": \"${user.customproperty1}\",\"name\": {\"givenName\": \"${user.firstname}\",\"familyName\": \"${user.lastname}\"},\"emails\": [{\"primary\": \"true\",\"value\": \"${user.email}\",\"type\": \"work\"}],\"displayName\": \"${user.displayname}\",\"locale\": \"en\",\"timezone\": \"${user.city}\",\"title\": \"${user.title}\",\"addresses\": [{\"type\": \"work\",\"primary\": \"true\",\"value\": \"${user.street}, ${user.city}\"}]}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
204
]
}
},
{
"name": "call2",
"connection": "acctAuth",
"url": "https://ABC.com/scim/v2/Users/${account.accountID}",
"httpMethod": "PATCH",
"callCondition": "${arstasksObj?.source == 'PROVRULE'}",
"httpContentType": "application/json",
"httpParams": "{\"Operations\": [{\"op\": \"replace\",\"value\": {\"userType\": \"${requestAccessAttributes.get('RoleAccess') == 'IT admin' ? '1346' : (requestAccessAttributes.get('RoleAccess') == 'IT viewer' ? '1312' : requestAccessAttributes.get('RoleAccess'))}\"}}]}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
204
]
}
}
]
}
07/16/2024 04:15 PM
Thanks for your help. It worked after adding the call condition.