Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/23/2023 05:56 AM - edited 08/23/2023 05:57 AM
It should work. After hours of trial and error, here is what I finally figured out.
This JSON "breaks" and causes the variable name instead of data to passed in for all variables:
{
"accountIdPath": "Entitlement.message.id",
"call": [
{
"name": "Entitlement",
"connection": "acctAuth",
"url": "https://scim.zscalertwo.net/REMOVED/scim/Users",
"httpMethod": "POST",
"httpParams": "{\"schemas\":[\"urn:ietf:params:scim:schemas:core:2.0:User\",\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\"],\"userName\":\"${user.systemUserName}@DOMAIN.COM\",\"displayName\":\"${user.displayname}\",\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\" : {\"department\":\"${user.departmentname}\"}}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
}
]
}
This JSON works and all variable data is passed correctly:
{
"accountIdPath": "Entitlement.message.id",
"call": [
{
"name": "Entitlement",
"connection": "acctAuth",
"url": "https://scim.zscalertwo.net/REMOVED/scim/Users",
"httpMethod": "POST",
"httpParams": "{\"schemas\":[\"urn:ietf:params:scim:schemas:core:2.0:User\",\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\"],\"userName\":\"${user.systemUserName}@DOMAIN.COM\",\"displayName\":\"${user.displayname}\",\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\" : {\"department\":\"${if(user.departmentname != null){user.departmentname} else{''}}\"}}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
}
]
}
Do you see the difference? Just a little bit of unnecessary javascript using the *same* Saviynt variable.. and this works.
{\"department\":\"${if(user.departmentname != null){user.departmentname} else{''}}\"}
Seems like a bug!