Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/08/2024 05:40 AM
Hi Team,
We are trying to createAccount in InsightVM App and the below JSON is provisioning the account in the Target side and the statuscode also 201, actually the relevant saviynt pending TaskID is not marking task status completed.
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"accountID": "call1.message.id~#~char"
},
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": false,
"url": "https://XXXXXXXX/api/3/users",
"httpMethod": "POST",
"httpParams": "{\"authentication\":{\"id\":\"${endpoints.displayName=='InsightVM Admin Access'?'1':'2'}\",\"type\":\"${endpoints.displayName=='InsightVM Admin Access'?'admin':'normal'}\"},\"email\":\"${user.email.toLowerCase()}\",\"enabled\":\"true\", \"login\":\"${endpoints.displayName=='InsightVM Admin Access'?('s'+user.username.substring(1,7)):arsTasks?.accountName}\",\"name\":\"${user.username}\",\"password\":\"${password}\",\"passwordResetOnLogin\":\"false\",\"role\":{\"allAssetGroups\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\", \"allSites\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\", \"id\":\"${endpoints.displayName=='InsightVM Admin Access'?'global-admin':'View Only'}\",\"superuser\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\"}}",
"httpHeaders": {
"Authorization": "Basic XXXXXX"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404
]
}
}
]
}
Could you please let us know any issue in the above json. Please find the attached log file.
Thanks,
Rafi
Solved! Go to Solution.
07/08/2024 05:49 AM
Hi @mahammed_raffi can you try with the below JSON?
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"accountID": "call1.message.id~#~char"
},
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "https://XXXXXXXX/api/3/users",
"httpMethod": "POST",
"httpParams": "{\"authentication\":{\"id\":\"${endpoints.displayName=='InsightVM Admin Access'?'1':'2'}\",\"type\":\"${endpoints.displayName=='InsightVM Admin Access'?'admin':'normal'}\"},\"email\":\"${user.email.toLowerCase()}\",\"enabled\":\"true\", \"login\":\"${endpoints.displayName=='InsightVM Admin Access'?('s'+user.username.substring(1,7)):arsTasks?.accountName}\",\"name\":\"${user.username}\",\"password\":\"${password}\",\"passwordResetOnLogin\":\"false\",\"role\":{\"allAssetGroups\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\", \"allSites\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\", \"id\":\"${endpoints.displayName=='InsightVM Admin Access'?'global-admin':'View Only'}\",\"superuser\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\"}}",
"httpHeaders": {
"Authorization": "Basic XXXXXX"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404
]
}
}
]
}
07/09/2024 01:48 AM
Hi @naveenss ,
I have tried with this JSON as well, still no luck. TaskID still in pending state only.
Thanks,
Rafi
07/08/2024 05:52 AM
Hi @mahammed_raffi , is the account created on application end ??
Can you share json response for create account from postman
07/08/2024 06:01 AM
Hi @NM - Please find the below api response for above request (taskid)
{
"authentication": {
"external": false,
"id": 1,
"links": [
{
"href": "https://XXXXX/api/3/authentication_sources/1",
"rel": "self"
},
{
"href": "https://XXXXX/api/3/authentication_sources/1/users",
"rel": "Authentication Source Users"
}
],
"name": "Builtin Administrators",
"type": "admin"
},
"email": "sachinravindra.shelake@xxxxxxx.com",
"enabled": true,
"id": 328,
"links": [
{
"href": "https://XXXXX/api/3/users/328",
"rel": "self"
},
{
"href": "https://XXXXX/api/3/authentication_sources/1",
"rel": "Authentication Source"
},
{
"href": "https://XXXXX/api/3/users/328/asset_groups",
"rel": "Asset Groups"
},
{
"href": "https://XXXXX/api/3/users/328/sites",
"rel": "Sites"
},
{
"href": "https://XXXXX/api/3/users/328/privileges",
"rel": "Privileges"
},
{
"href": "https://XXXXX/api/3/roles/global-admin",
"rel": "Role"
}
],
"locale": {
"default": "en-US",
"reports": "en-US"
},
"locked": false,
"login": "sp3pqhc",
"name": "sp3pqhc",
"role": {
"allAssetGroups": true,
"allSites": true,
"id": "global-admin",
"name": "Global Administrator",
"privileges": [
"all-permissions",
"approve-vulnerability-exceptions",
"assign-scan-engine",
"assign-scan-template",
"assign-ticket-assignee",
"close-tickets",
"configure-global-settings",
"create-reports",
"create-tickets",
"delete-vulnerability-exceptions",
"manage-advpolicies",
"manage-asset-group-access",
"manage-asset-group-assets",
"manage-dynamic-asset-groups",
"manage-policies",
"manage-report-access",
"manage-report-templates",
"manage-scan-alerts",
"manage-scan-engines",
"manage-scan-templates",
"manage-site-access",
"manage-site-credentials",
"manage-sites",
"manage-static-asset-groups",
"manage-tags",
"manage-vuln-investigations",
"purge-site-asset-data",
"schedule-automatic-scans",
"specify-scan-targets",
"specify-site-metadata",
"start-unscheduled-scans",
"submit-vulnerability-exceptions",
"use-restricted-report-sections",
"view-asset-group-asset-data",
"view-site-asset-data",
"view-vuln-investigations"
],
"superuser": true
}
}
07/08/2024 06:08 AM
Try this
{
"accountIdPath": "call1.message.authentication.id",
"responseColsToPropsMap": {
"accountID": "call1.message.authentication.id~#~char"
},
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "https://XXXXXXXX/api/3/users",
"httpMethod": "POST",
"httpParams": "{\"authentication\":{\"id\":\"${endpoints.displayName=='InsightVM Admin Access'?'1':'2'}\",\"type\":\"${endpoints.displayName=='InsightVM Admin Access'?'admin':'normal'}\"},\"email\":\"${user.email.toLowerCase()}\",\"enabled\":\"true\", \"login\":\"${endpoints.displayName=='InsightVM Admin Access'?('s'+user.username.substring(1,7)):arsTasks?.accountName}\",\"name\":\"${user.username}\",\"password\":\"${password}\",\"passwordResetOnLogin\":\"false\",\"role\":{\"allAssetGroups\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\", \"allSites\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\", \"id\":\"${endpoints.displayName=='InsightVM Admin Access'?'global-admin':'View Only'}\",\"superuser\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\"}}",
"httpHeaders": {
"Authorization": "Basic XXXXXX"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404
]
}
}
]
}
07/08/2024 07:42 PM
07/09/2024 01:47 AM
Hi @NM ,
I can still see the same error, Please find the attached log file and the line number from 80 to 98.
Thanks,
Rafi
07/09/2024 02:27 AM
Hi @mahammed_raffi ,
Can you share the response you are getting in your pending tasks. You can get it from task Action --> View --> Provisioning Comments
07/09/2024 02:41 AM - edited 07/09/2024 02:42 AM
@pmahalle - Please find below.
{"call1":{"headers":"u4PixYGT7bG1L7GRcyqosGZegCb4UhcvLSeogVTRnooRP6Cbe+oWgxIW2OOruNIzRIEV72m3Gt9jHFFZculp+DTVgeRf4v9kihNuRLQkYjx4rvhtt2IGisV6u0jmrnzvegJuxCAaKDLoBXcc8WmuzrNda8yiOI5+K8Nr9jR5Uue25eONqT0YmEzobI29UAH9ToJUSVFc905ruG3w1zyAlqfkNFflmdFpILe4hd9Vhtvi9sHVJ6u7rNLpeAtyQ2nfv5BhUbI6jyiS0gZH73UhXd+Cl2PHy7EdvRWhMQqJm++laAiH0+XeuC8dJnjTgv/bmYhW2P9tlYLvDfn9qXYU8YDiXRBJFdqI8lw4PLYCLkO72pi/3uU9jMEFkdfED7d81Z6z2PnpJWIZtW7OkeWdbQOOuO6dPh+BW4sIVoDdPO/vRhiwVI+5E9tcA9JI7+wQuvn4qPzpF9wKJ8aOtQsIXuqjCuPdTmz+NNF7cyzlMTLX+YyykKFmX+l07/QOK2ctJjq6V18UChk66UkmJcm54iFtvErsXtzxQ6bsTVYzAo5p2Pg+HUhSGgBSltyMzTPbY+13l0z+z9W9nckbC7lM7tV071loED45s7QbkuI1f+iL4IVqG/Swu3xONEUsuxXnxjQjtithLBWFaISD0/n76wavzr32aG4bmvlVy5pzfta4OZ9T0CToghwbIHeuQ9+oDJZo+oPIozy4kRgSeWjB/0Sbp+GVldMF5xPHoDyEVfwObN7LsqW/MjHhzIcB9fa+9vxuRr3A79j1tQBhnWPWVvzYxinr2x9JZVu+pWgzpOc=","message":{"links":[{"href":"https:/XXXX/api/3/users","rel":"self"},{"href":"XXXX/api/3/users/333","rel":"self"}],"id":333},"statusCode":201,"description":null,"status":"Success"}}
07/09/2024 02:44 AM
@mahammed_raffi Share your current createaccount json please
07/09/2024 02:48 AM
{
"accountIdPath": "call1.message.authentication.id",
"responseColsToPropsMap": {
"accountID": "call1.message.id~#~char"
},
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "https://XXXX/api/3/users",
"httpMethod": "POST",
"httpParams": "{\"authentication\":{\"id\":\"${endpoints.displayName=='InsightVM Admin Access'?'1':'2'}\",\"type\":\"${endpoints.displayName=='InsightVM Admin Access'?'admin':'normal'}\"},\"email\":\"${user.email.toLowerCase()}\",\"enabled\":\"true\", \"login\":\"${endpoints.displayName=='InsightVM Admin Access'?('s'+user.username.substring(1,7)):arsTasks?.accountName}\",\"name\":\"${user.username}\",\"password\":\"${password}\",\"passwordResetOnLogin\":\"false\",\"role\":{\"allAssetGroups\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\", \"allSites\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\", \"id\":\"${endpoints.displayName=='InsightVM Admin Access'?'global-admin':'View Only'}\",\"superuser\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\"}}",
"httpHeaders": {
"Authorization": "Basic c2F2aXludGFwaXVzZXI6V2VsY29tZUAxMjM="
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404
]
}
}
]
}
07/09/2024 02:51 AM
Use below createaccount JSON and for fresh new account task.
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"accountID": "call1.message.id~#~char"
},
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "https://XXXX/api/3/users",
"httpMethod": "POST",
"httpParams": "{\"authentication\":{\"id\":\"${endpoints.displayName=='InsightVM Admin Access'?'1':'2'}\",\"type\":\"${endpoints.displayName=='InsightVM Admin Access'?'admin':'normal'}\"},\"email\":\"${user.email.toLowerCase()}\",\"enabled\":\"true\", \"login\":\"${endpoints.displayName=='InsightVM Admin Access'?('s'+user.username.substring(1,7)):arsTasks?.accountName}\",\"name\":\"${user.username}\",\"password\":\"${password}\",\"passwordResetOnLogin\":\"false\",\"role\":{\"allAssetGroups\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\", \"allSites\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\", \"id\":\"${endpoints.displayName=='InsightVM Admin Access'?'global-admin':'View Only'}\",\"superuser\":\"${endpoints.displayName=='InsightVM'?'false':'true'}\"}}",
"httpHeaders": {
"Authorization": "Basic c2F2aXludGFwaXVzZXI6V2VsY29tZUAxMjM="
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404
]
}
}
]
}
07/09/2024 11:03 PM
Does user is getting created in target ?