Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/17/2023 05:26 PM - last edited on 10/17/2023 11:47 PM by Sunil
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.
Following is the createAccount Json:
{
"accountIdPath":"call1.message.result.sys_id.value",
"responseColsToPropsMap":{
},
"call":[
{
"name":"call1",
"connection":"userAuth",
"url":"https://XXXXX-service-now.com/api/now/table/sys_user ",
"httpMethod":"POST",
"httpParams":"{\"active\":\"${user.status}\",\"company\":\"${user.companyname}\",\"department\": \"${user.customproperty5}\",\"email\":\"${user.email}\",\"employee_number\":\"${user.employeeid}\",\"first_name\":\"${user.firstname}\",\"last_name\":\"${user.lastname}\",\"location\":\"${user.location}\",\"manager\":\"${user.manager}\",\"mobile_phone\":\"${user.phonenumber}\",\"phone\":\"${user.customproperty12}\",\"title\":\"${user.jobcodedesc}\",\"user_name\":\"${user.username}\",\"u_branch\":\"${user.customproperty7}\",\"u_directorate\":\"${user.departmentname}\",\"u_join_date\":\"${user.start_date}\",\"u_person_category\":\"${user.customproperty22}\",\"u_person_category_code\":\"${user.customproperty21}\",\"u_position_number\":\"${user.jobCode}\",\"u_reports_to\":\"${user.manager}\",\"u_request_approver\":\"${user.customproperty20}\",\"u_responsibility_centre\":\"${user.costcenter}\",\"u_section\":\"${user.customproperty10}\",\"u_sub_section\":\"${user.customproperty13}\",\"u_termination_date\":\"${user.termDate}\"}",
"httpHeaders":{
"Authorization":"${access_token}" },
"httpContentType":"application/json",
"unsuccessResponses":{
"error.message":"Operation Failed" }
}
]
There is no error in log other than 403. Also when tried this api separately on postman , it is working as expected.
Any pointer will be appreciated !!!
Thanks
[This message has been edited by moderator to disable URL]
Solved! Go to Solution.
10/17/2023 08:42 PM
@dchaudhary1 JSON is looking good.
Did you observe any specific case it is failing to create new account?
Could you please check the user status and manager attribute for the failed scenario.
You can also use
\"active\":\"true\"
10/18/2023 04:41 AM - edited 10/18/2023 04:41 AM
Hi @SumathiSomala ,
Thank you for the reply
I have same manager and active is true , out of three one works and two fails.
Thanks,
Divya
10/18/2023 04:44 AM
@dchaudhary1 what it mean by out of three one works and two fails?
10/18/2023 04:48 AM
@SumathiSomala ,one user got provisioned and other two failed provisioning. That's what I have mentioned in my query the provisioning works intermittently.
10/17/2023 08:50 PM
Its should be data issue. does any of data contains special characters
10/18/2023 04:45 AM
Hi @rushikeshvartak ,
Thank you for your reply.
I even tried same data for each user only username is different , still no luck.
Also when I try directly to on postman , it is working for consecutive users.
Thanks,
Divya
10/18/2023 08:31 PM
This generally happens when the attribute mapped for provisioning is not correct.
Also check the username you are trying to provision.
10/18/2023 05:56 PM
Thanks @SumathiSomala , @rushikeshvartak .
I got it working as one of the field "start date" was not passed with right saviynt attribute , hence it would provision user with username ${username} and it will fail subsequent users as the user with ${username} existed.