Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/04/2024 10:16 AM
Hello,
We configured an endpoint with REST Connector. when we create account, the backend always complain we are missing required attributes but we do setup the required attribute mapping from user attributes. Although we turned on debug with ConfigJSON, but it does not show all attributes we mapped.
How can we add debug log entries in the CreateAccountJSON to print all mapped attribute values?
Thanks
09/04/2024 10:21 AM - edited 09/04/2024 10:21 AM
If logs with showlogs=true, are showing the API call and some attributes then that is what Saviynt calling.
Can you share your create account json. We also have a create account json where we have mapped 20 attributes but based on conditions, it sometimes sends 15 , sometimes 16 etc..
09/04/2024 10:29 AM
09/04/2024 10:40 AM - edited 09/04/2024 10:49 AM
Hello Rushikesh,
See attached configuration JSON. the CreateAccountJSON have no issues for parsing because backend server received the request but respond with 400 bad request error which indicate the required attribute were not provided. but we configured all of them. However, we cannot see all the request data in Saviynt log file, that's why I want to add custom log entries to debug.
here is the logs show. we expect it shows all attributes no matter it is null or empty etc. but it only show few attributes, it even does not how the hardcoded value of "status": "Active".
"DEBUG","Calling Webservice Url - https://https://mybackendserver:443/rest/api_add_user with httpParams -
[account:[
username=******&C, I&T Back Office],
groups:[],
auto_assign:Both,
timezone:America/Chicago,
location:Baldwin, IL,
password=******"
09/04/2024 11:34 AM
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://mybackendserver:443/rest/api_add_user",
"httpMethod": "POST",
"showResponse": true,
"httpParams": "{\"account\": {\"username\": \"${arstasksObj?.accountName}\", \"first_name\": \"${user?.firstname?.trim() ?: ''}\", \"last_name\": \"${user?.lastname?.trim() ?: ''}\", \"email\": \"${user?.email?.trim() ?: ''}\", \"pin\": \"${user?.username?.trim().replaceAll('[^0-9]','')}\", \"status\": \"Active\", \"type\": \"${requestAccessAttributes.get('type')?.trim() ?: com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'type')?.trim() ?: 'Signal'}\", \"role\": \"${requestAccessAttributes.get('role')?.trim() ?: com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'role')?.trim() ?: 'Employee'}\", \"departments\": ${requestAccessAttributes.get('departments')?.trim()? requestAccessAttributes.get('departments').split(',').collect{'\"' + it.trim() + '\"'} : com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'departments')?.size() > 0 ? com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'departments').collect{'\"' + it.trim() + '\"'} : []}, \"groups\": ${requestAccessAttributes.get('groups')?.trim()? requestAccessAttributes.get('groups').split(',').collect{'\"' + it.trim() + '\"'} : com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'groups')?.size() > 0 ? com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'groups').collect{'\"' + it.trim() + '\"'} : []}, \"auto_assign\": \"${requestAccessAttributes.get('auto_assign')?.trim() ?: com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'auto_assign')?.trim() ?: 'Both'}\", \"timezone\": \"${requestAccessAttributes.get('timezone')?.trim() ?: com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'timezone')?.trim() ?: 'America/Chicago'}\", \"location\": \"${requestAccessAttributes.get('location')?.trim() ?: com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'location')?.trim() ?: ''}\", \"password\": \"${password}\"}}",
"httpHeaders": {
"Authorization": "${access_token}",
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
409,
415,
416,
429,
500,
502,
503,
504
]
}
}
],
"accountIdPath": "accountName"
}
09/04/2024 11:56 AM
{
"accountIdPath": "accountName",
"responseColsToPropsMap": {},
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://mybackendserver:443/rest/api_add_user",
"httpMethod": "POST",
"showResponse": true,
"httpParams": "{\"account\": {\"username\": \"${arstasksObj?.accountName}\", \"first_name\": \"${user?.firstname?.trim() ?: ''}\", \"last_name\": \"${user?.lastname?.trim() ?: ''}\", \"email\": \"${user?.email?.trim() ?: ''}\", \"pin\": \"${user?.username?.trim()?.replaceAll('[^0-9]', '')}\", \"status\": \"Active\", \"type\": \"${requestAccessAttributes.get('type')?.trim() ?: com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'type')?.trim() ?: 'Signal'}\", \"role\": \"${requestAccessAttributes.get('role')?.trim() ?: com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'role')?.trim() ?: 'Employee'}\", \"departments\": ${requestAccessAttributes.get('departments')?.trim() ? requestAccessAttributes.get('departments').split(',').collect { '\"' + it.trim() + '\"' } : com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'departments')?.size() > 0 ? com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'departments').collect { '\"' + it.trim() + '\"' } : []}, \"groups\": ${requestAccessAttributes.get('groups')?.trim() ? requestAccessAttributes.get('groups').split(',').collect { '\"' + it.trim() + '\"' } : com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'groups')?.size() > 0 ? com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'groups').collect { '\"' + it.trim() + '\"' } : []}, \"auto_assign\": \"${requestAccessAttributes.get('auto_assign')?.trim() ?: com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'auto_assign')?.trim() ?: 'Both'}\", \"timezone\": \"${requestAccessAttributes.get('timezone')?.trim() ?: com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'timezone')?.trim() ?: 'America/Chicago'}\", \"location\": \"${requestAccessAttributes.get('location')?.trim() ?: com.custom.AttributeValueProvider.getAttributeValue('' + arstasksObj.id, 'location')?.trim() ?: ''}\", \"password\": \"${password}\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
409,
415,
416,
429,
500,
502,
503,
504
]
}
}
]
}