Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

ServiceNow Provisioning Failing intermittently

ankitalande
New Contributor II
New Contributor II

Hi All,

We are facing this issue when we are trying to provision serviceNow account. The provisioning fails intermittently with following error:

"message":{"error":{"message":"Operation Failed","detail":"Error during insert of sys_user (${user.firstname} ${user.lastname})"},"status":"failure"},"statusCode":403,"description":null,"status":"Failed"}}

This error is observed if user already exist in ServiceNow, but this is not the case. We have verified that user we are trying to provision is not present in serviceNow.

We observed that when we pass the inactive manager name or manager account not prsent the servicenow then this error is occured.

Following is the createAccount Json:

{
"accountIdPath": "call1.message.result.sys_id",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://xyz/api/now/table/sys_user",
"httpMethod": "POST",
"httpParams": "{\"name\":\"${user.username}\",\"location\":\"${user.location}\",\"email\":\"${user.email}\",\"first_name\":\"${user.firstname}\",\"last_name\":\"${user.lastname}\",\"employee_number\":\"${user.username}\",\"user_name\":\"${user.systemUserName}\",\"u_employeeid\":\"${user.username}\",\"department\":\"${user.departmentname}\",\"manager\":\"${managerAccount.accountID}\",\"u_position\":\"${user.jobcodedesc}\",\"u_discovery_source\":\"Saviynt\",\"active\":\"true\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
202
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
412,
422
]
}
}
]
}

Could u please suggest the manager syntax - how we need to pass manager syntax even if the user manager account is inactive or not prsent in servicenow.

3 REPLIES 3

SumathiSomala
All-Star
All-Star

@ankitalande 

try below

\"manager\":\"${managerAccount==null?'':managerAccount.accountID}\"
\"manager\":\"${if(managerAccount!=null){managerAccount.accountID} else{''}}\"

Regards,
Sumathi Somala

If this reply answered your question, please Accept As Solution and give Kudos.

ankitalande
New Contributor II
New Contributor II

Thanks, it's working now

@ankitalande If my response resolved  your issue then please click  Accept As Solution and give Kudos.

 

Regards,
Sumathi Somala

If this reply answered your question, please Accept As Solution and give Kudos.