Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/08/2024 07:36 AM
I am using rest API for ADD/Remove access. I am having an issue while mapping the response.
{
"accountIdPath": "accountName",
"responseColsToPropsMap": {},
"call": [
{
"name": "Role",
"connection": "acctAuth",
"url": "https://uat-cloud.net/CustomServices/.asmx/AddEntitlementToUser?userName=${user.customproperty22}&entitlementValue=${entitlementValue.entitlementID}",
"httpMethod": "POST",
"httpHeaders": {
"Accept": "application/json"
},
"httpContentType": "application/x-www-form-urlencoded",
"successResponses": {
"responseBodyEquals": "true"
},
"unsuccessResponses": {
"responseBodyEquals": "false"
}
}
]
}
Postman Response:
We are always getting 200 if we hit the API,
Response Body:
False mean failed
<?xml version="1.0" encoding="utf-8">
<bolean xmlns="http://tempuri.org">false</bolean>
True mean success
<?xml version="1.0" encoding="utf-8">
<bolean xmlns="http://tempuri.org">true</bolean>
t
08/08/2024 07:41 AM - edited 08/08/2024 07:43 AM
Hi @GPS , you don't need accountIDpath for add and remove json it is only used for create account.
Try this
"boolean": false
08/08/2024 10:30 AM
@NM I am getting response as below.
{
"Role": {
"headers": "qc2hUNXfxzkM1F",
"message": {
"boolean": {
"xmlns": "http://tempuri.org/",
"content": "false"
}
},
"statusCode": 200,
"description": null,
"status": "Success"
}
}
08/08/2024 01:16 PM
Role.message.boolean.content
08/08/2024 07:21 PM - edited 08/08/2024 07:51 PM
@rushikeshvartak @NM
I tried multiple options but still I can't keep the task in a pending state.
"httpContentType": "application/x-www-form-urlencoded",
"successResponses": [
{
"Message.boolean.content": [
"true"
]
},
{
"Role.Message.boolean.content": [
"true"
]
},
{
"boolean.content": [
"true"
]
},
{
"content": [
"true"
]
},
{
"Role.Message.boolean.content": true
},
{
"Message.boolean.content": true
},
{
"boolean.content": true
},
{
"content": true
}
],
"unsuccessResponses": [
{
"Message.boolean.content": [
"false"
]
},
{
"Role.Message.boolean.content": [
"false"
]
},
{
"boolean.content": [
"false"
]
},
{
"content": [
"false"
]
},
{
"Message.boolean.content": false
},
{
"Role.Message.boolean.content": false
},
{
"boolean.content": false
},
{
"content": false
}
]
It is closing the task.
08/08/2024 10:33 AM
08/08/2024 12:17 PM - edited 08/08/2024 12:36 PM
@NM
Error:
I tried multiple things. It didn't work.
"boolean.content": "false"
"boolean.content": false
"message.boolean.content": "false"
"message.boolean.content": false
"content": "false"
"content": false
08/08/2024 08:20 PM
Hi @GPS please try the below format
{
"successResponses":[
{
"statusCode":200
},
{
"responsePath":"Role.Message.boolean.content",
"values":["true"]
}
],
"unsuccessResponses":[
{
"statusCode":200
},
{
"responsePath":"Role.Message.boolean.content",
"values":["false"]
}
]
}
Response curated based on the below forum posts
Let me know if this helps!
08/09/2024 09:42 AM - edited 08/09/2024 10:10 AM
@naveenss
Now, the task is sitting in a pending state without moving to a completed state.
1st Run:
{"auditDetails":{"Role":[{"headers":null,"message":{"boolean":{"xmlns":"http://tempuri.org/","content":"true"}},"statusCode":200,"description":null,"status":"Failed"}]},
2nd Run:
"Role":{"headers":null,"message":{"boolean":{"xmlns":"http://tempuri.org/","content":"false"}},"statusCode":200,"description":null,"status":"Failed"}}
08/09/2024 12:51 PM
{
"successResponses":[
{
"statusCode":200
},
{
"responsePath":"Role.message.boolean.content",
"values":["true"]
}
],
"unsuccessResponses":[
{
"statusCode":200
},
{
"responsePath":"Role.message.boolean.content",
"values":["false"]
}
]
}
08/09/2024 01:40 PM
@rushikeshvartak @naveenss
I tried it already with multiple combinations the task is still waiting in the pending state.
Provisioning Comments
Log error:
08/12/2024 06:36 AM
@rushikeshvartak, @naveenss, @NM
Any other suggestions?
I tried multiple combinations.
08/12/2024 06:37 AM
Can you share all possible tried solutions
08/12/2024 06:46 AM
These below are keeping the task in pending state.
{
"successResponses":[
{
"statusCode":200
},
{
"responsePath":"Role.message.boolean.content",
"values":["true"]
}
],
"unsuccessResponses":[
{
"statusCode":200
},
{
"responsePath":"Role.message.boolean.content",
"values":["false"]
}
]
}
{
"successResponses":[
{
"statusCode":200
},
{
"responsePath":"message.boolean.content",
"values":["true"]
}
],
"unsuccessResponses":[
{
"statusCode":200
},
{
"responsePath":"message.boolean.content",
"values":["false"]
}
]
}
{
"successResponses":[
{
"statusCode":200
},
{
"responsePath":"boolean.content",
"values":["true"]
}
],
"unsuccessResponses":[
{
"statusCode":200
},
{
"responsePath":"boolean.content",
"values":["false"]
}
]
}
This i reduced it till just the content like (Role.Message.boolean.content, Message.boolean.content, boolean.content, content)
{
"successResponses":[
{
"statusCode":200
},
{
"Role.Message.boolean.content": true
}
],
"unsuccessResponses":[
{
"statusCode":200
},
{
"Role.Message.boolean.content": false
}
]
}
This i reduced it till just the content like (Role.Message.boolean.content, Message.boolean.content, boolean.content, content)
{
"successResponses":[
{
"statusCode":200
},
{
"Role.Message.boolean.content": ["true"]
}
],
"unsuccessResponses":[
{
"statusCode":200
},
{
"Role.Message.boolean.content": ["false"]
}
]
}
***********************************************************************
This is closing the task even if the status is false.
"httpContentType": "application/x-www-form-urlencoded",
"successResponses": [
{
"Message.boolean.content": [
"true"
]
},
{
"Role.Message.boolean.content": [
"true"
]
},
{
"boolean.content": [
"true"
]
},
{
"content": [
"true"
]
},
{
"Role.Message.boolean.content": true
},
{
"Message.boolean.content": true
},
{
"boolean.content": true
},
{
"content": true
}
],
"unsuccessResponses": [
{
"Message.boolean.content": [
"false"
]
},
{
"Role.Message.boolean.content": [
"false"
]
},
{
"boolean.content": [
"false"
]
},
{
"content": [
"false"
]
},
{
"Message.boolean.content": false
},
{
"Role.Message.boolean.content": false
},
{
"boolean.content": false
},
{
"content": false
}
]
08/12/2024 07:05 AM
08/12/2024 08:08 AM
@rushikeshvartak
Yes, we are getting responses in XML from Postman.
False mean failed
<?xml version="1.0" encoding="utf-8">
<bolean xmlns="http://tempuri.org">false</bolean>
True mean success
<?xml version="1.0" encoding="utf-8">
<bolean xmlns="http://tempuri.org">true</bolean>
In Saviynt logs:
08/12/2024 09:19 AM
{
"accountIdPath": "accountName",
"responseColsToPropsMap": {},
"call": [
{
"name": "Role",
"connection": "acctAuth",
"url": "https://uat-cloud.net/CustomServices/.asmx/AddEntitlementToUser?userName=${user.customproperty22}&en...}",
"httpMethod": "POST",
"httpHeaders": {
"Accept": "application/json"
},
"httpContentType": "application/x-www-form-urlencoded",
"successResponses": {
"responseBodyContains": "<boolean>true</boolean>"
},
"unsuccessResponses": {
"responseBodyContains": "<boolean>false</boolean>"
}
}
]
}
08/13/2024 10:14 PM
Hello @rushikeshvartak
I tried multiple options and still it is not working.
"successResponses": [
{
"statusCode": 200
},
{
"responseBodyContains": "<boolean xmlns=\"http://tempuri.org\">true</boolean>"
}
],
"unsuccessResponses": [
{
"statusCode": 200
},
{
"responseBodyContains": "<boolean xmlns=\"http://tempuri.org\">false</boolean>"
}
]
"successResponses": [
{
"statusCode": 200
},
{
"responseBodyContains": ["true"]
}
],
"unsuccessResponses": [
{
"statusCode": 200
},
{
"responseBodyContains": ["false"]
}
]
"successResponses": {
"responseBodyContains": [
"<boolean xmlns=\"http://tempuri.org\">true</boolean>"
]
},
"unsuccessResponses": {
"responseBodyContains": [
"<boolean xmlns=\"http://tempuri.org\">false</boolean>"
]
}
08/16/2024 06:45 AM
@NM @rushikeshvartak @naveenss
Any other suggestions?
08/26/2024 12:07 PM
@GPS ,
did you happen to try the below mapping by combing them all into single object for for both success and unsuccess responses?
{
"successResponses": {
"statusCode": 200,
"responsePath": "Role.Message.boolean.content",
"values": ["true"]
},
"unsuccessResponses": {
"statusCode": 200,
"responsePath": "Role.Message.boolean.content",
"values": ["false"]
}
}
08/26/2024 08:59 PM
@GPS
The response is in XML, and Saviynt could not handle the response to hold the ticket status as the statusCode is constantly retuning 200.
1. Create a Saviynt support Ticket.
2. Check with the application teams to change the response codes.