Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/27/2024 09:40 AM
I am getting same error continuously when trying to create new account for a user in SNOW.
Create Account JSON:
{
"accountIdPath":"call1.message.result.sys_id",
"responseColsToPropsMap":{
},
"call":[
{
"name":"call1",
"connection":"userAuth",
"url":"https://xxxdev.service-now.com/api/now/table/sys_user",
"httpMethod":"POST",
"httpParams":"{\"CITY\":\"Delhi\",\"STATUSKEY\":\"1\",\"COMPANYNAME\":\"Tech Solutions\",\"MOBILEPHONE\":\"1234\",\"COUNTRY_CODE\":\"IN\",\"EMAIL\":\"test4@xxxq.com\",\"FIRSTNAME\":\"Saviynt4\",\"LASTNAME\":\"Test4\",\"PHONENUMBER\":\"4321234\",\"EMPLOYEEID\":\"123456709\",\"USERNAME\":\"SAVIYNT004\",\"STARTDTE\":\"2023-01-01\",\"ENDDTE\":\"2025-12-31\",\"LOCATION\":\"3901\",\"FUNCMGR_EMPID\":\"00028894\"}",
"httpHeaders":{
"Authorization":"${access_token}" },
"httpContentType":"application/json",
"unsuccessResponses":{
"error.message":"Operation Failed" }
}
]
}
Dynamic Payload:
{
"accountIdPath":"call1.message.result.sys_id",
"responseColsToPropsMap":{
},
"call":[
{
"name":"call1",
"connection":"userAuth",
"url":"https://xxxdev.service-now.com/api/now/table/sys_user",
"httpMethod":"POST",
"httpParams":"{\"CITY\":\"${user.city}\",\"STATUSKEY\":\"1\",\"COMPANYNAME\":\"${user.companyname}\",\"MOBILEPHONE\":\"${user.secondaryPhone}\",\"COUNTRY_CODE\":\"${user.customproperty6}\",\"EMAIL\":\"${user.email}\",\"FIRSTNAME\":\"${user.firstname}\",\"LASTNAME\":\"${user.lastname}\",\"PHONENUMBER\":\"${user.phonenumber}\",\"EMPLOYEEID\":\"${user.employeeid}\",\"USERNAME\":\"${user.username}\",\"STARTDTE\":\"${user.startdate.format('yyyy-MM-dd')}\",\"ENDDTE\":\"${user.enddate.format('yyyy-MM-dd')}\",\"LOCATION\":\"${user.location}\",\"FUNCMGR_EMPID\":\"${userManager.employeeid}\"}",
"httpHeaders":{
"Authorization":"${access_token}" },
"httpContentType":"application/json",
"unsuccessResponses":{
"error.message":"Operation Failed" }
}
]
}
Tried with both static and Dynamic values but still getting same error.
Note*: I am able to reconcile all the accounts from SNOW.
Error:
"auditDetails":{"call1":[{"headers":null,"message":{"error":{"message":"Operation Failed","detail":"ACL Exception Insert Failed due to security constraints"},"status":"failure"
Solved! Go to Solution.
08/27/2024 09:46 AM
08/27/2024 09:52 AM
Hi Rushi,
I am able to create an account via postman successfully with same Service account and password.
But somehow exact same call doesn't work when trying via Saviynt.
08/27/2024 09:52 AM
Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️
Also share saviynt logs in text file
08/27/2024 10:04 AM - last edited on 08/27/2024 10:52 PM by Sunil
curl 'https://xxxdev.service-now.com/api/x_hirp_iga_int/iga/CreateAccount ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer *************************Zg' \
--header 'Cookie: BIGipServerpool_xxxdev=f8824f00ba6819ba41232fda486aee1a; JSESSIONID=80DB23B6A962675BB9170684100AE9DD; glide_node_id_for_js=90d62b335f9bdde64546ba54a7c926cb74e6e823c12811f7c0698bfdf9e4bc6c; glide_user_activity=U0N2M18xOjBPQ3VmbEZPM3FUWTBkRzRWUFBzOFlGbG1odTVBTHE4YndKQ2g4cHdlbVk9OmhJN2plWUZsQ2JhbUlWWDVLOENLeTRXdTFQTUFsd2RMRlZYT0NyVWZuSHM9; glide_user_route=glide.e6e4161e15368b1d3303e5fff5dc41be' \
--data-raw '{
"City":"Delhi",
"STATUSKEY":"1",
"COMPANYNAME":"Tech Solutions",
"MOBILEPHONE":"1234",
"COUNTRY_CODE":"IN",
"EMAIL":"test3@xxxq.com",
"FIRSTNAME":"Saviynt4",
"LASTNAME":"Test4",
"PHONENUMBER":"4321234",
"EMPLOYEEID":"12345678",
"USERNAME":"SAVIYNT004",
"STARTDTE":"2023-01-01",
"ENDDTE":"2025-12-31",
"LOCATION":"3901",
"FUNCMGR_EMPID":"00028894"
}'
[This message has been edited by moderator to mask sensitive information]
08/27/2024 10:06 AM
Does any other operations working such as import if yes hardcode token in create json and validate
08/27/2024 10:17 AM
08/27/2024 10:17 AM
You are using wrong URL, Please use updated JSON
Expected : https://xxxdev.service-now.com/api/x_hirp_iga_int/iga/CreateAccount
Actual : https://xxxdev.service-now.com/api/now/table/sys_user
08/27/2024 10:10 AM
Hi @Abhishek0406 , share your connection json
08/27/2024 10:18 AM
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://xxxdev.service-now.com/oauth_token.do",
"httpParams": {
"password": "xxxE3u]2%]Fa$uSNB6wxxx",
"grant_type": "password",
"scope": "useraccount",
"client_id": "xxx16db4a4",
"client_secret": "xxxyii.",
"username": "saviynt.integration.dev" },
"httpHeaders": {
"Content-Type": "application/x-www-form-urlencoded" },
"authError": [
"InvalidAuthenticationToken" ],
"httpMethod": "POST",
"httpContentType": "application/x-www-form-urlencoded",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"retryFailureStatusCode": [
401
],
"accessToken": "Bearer token" }
}
}
}
Masked credentials due to security purposes.
08/27/2024 10:17 AM
You are using wrong URL, Please use updated JSON
Expected : https://xxxdev.service-now.com/api/x_hirp_iga_int/iga/CreateAccount
Actual : https://xxxdev.service-now.com/api/now/table/sys_user
{
"accountIdPath": "call1.message.result.sys_id",
"responseColsToPropsMap": {},
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://xxxdev.service-now.com/api/x_hirp_iga_int/iga/CreateAccount",
"httpMethod": "POST",
"httpParams": "{\"CITY\":\"Delhi\",\"STATUSKEY\":\"1\",\"COMPANYNAME\":\"Tech Solutions\",\"MOBILEPHONE\":\"1234\",\"COUNTRY_CODE\":\"IN\",\"EMAIL\":\"test4@xxxq.com\",\"FIRSTNAME\":\"Saviynt4\",\"LASTNAME\":\"Test4\",\"PHONENUMBER\":\"4321234\",\"EMPLOYEEID\":\"123456709\",\"USERNAME\":\"SAVIYNT004\",\"STARTDTE\":\"2023-01-01\",\"ENDDTE\":\"2025-12-31\",\"LOCATION\":\"3901\",\"FUNCMGR_EMPID\":\"00028894\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"unsuccessResponses": {
"error.message": "Operation Failed"
}
}
]
}
08/27/2024 10:25 AM
Hi Rushi,
You are right, I was indeed using the wrong url all this time. Stupid 😕
I updated the correct url and it worked.
Thank you 🙂