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

TaskID status not getting completed.

mahammed_raffi
New Contributor
New Contributor

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

 

13 REPLIES 13

naveenss
All-Star
All-Star

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
                ]
            }
        }
    ]
}

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

Hi @naveenss ,

I have tried with this JSON as well, still no luck. TaskID still in pending state only.

Thanks,

Rafi

NM
Honored Contributor II
Honored Contributor II

Hi @mahammed_raffi , is the account created on application end ??

Can you share json response for create account from postman

mahammed_raffi
New Contributor
New Contributor

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
}
}

NM
Honored Contributor II
Honored Contributor II

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

                ]

            }

        }

    ]

}

  • Please share Ticket Status JSON not Create Ticket JSON

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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

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

pmahalle_1-1720517250134.png

 

 


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂

@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"}}

@mahammed_raffi Share your current createaccount json please


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂

{
"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
]
}
}
]
}

@mahammed_raffi ,

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
]
}
}
]
}


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂

Does user is getting created in target ?


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.