Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Not able to export session id from response

sandeepsingh
New Contributor
New Contributor

Hi All,

We have an XML based API which we are connecting use REST in Saviynt. It gives us the sessionid in reponse as below but we are not able to capture the same through response or as token.

Note: we are trying to do with XML to JSON conversion but for simplicity we tried with call1 & call2.

Response XML that comes is as below:

<NETBOX sessionid="*********">
<RESPONSE command="SearchPersonData" num="1"><CODE>SUCCESS</CODE></RESPONSE></NETBOX>

Below is our importaccount json

{
    "accountParams": {
        "connection": "acctAuth",
        "processingType": "SequentialAndIterative",
        "statusAndThresholdConfig": {
            "inactivateAccountsNotInFile": false,
            "correlateInactiveAccounts": true,
            "accountThresholdValue": 40000,
            "deleteAccEntForActiveAccounts": false
        },
        "includeExistingInActiveAccounts": true,
        "call": {
            "call1": {
                "callOrder": 0,
                "stageNumber": 0,
                "connection": "acctAuth",
                "http": {
                    "url": "http://********/nbws/goforms/nbapi",
                    "httpHeaders": {
                        "Content-Type": "text/xml"
                    },
                    "httpParams": "<NETBOX-API><COMMAND name=\"Login\" num=\"1\"><PARAMS><USERNAME>*******</USERNAME><PASSWORD>********</PASSWORD></PARAMS></COMMAND></NETBOX-API>",
                    "httpContentType": "text/xml",
                    "httpMethod": "POST"
                }
            },
            "call2": {
                "callOrder": 1,
                "stageNumber": 1,
                "connection": "acctAuth",
                "http": {
                    "url": "http://********/nbws/goforms/nbapi",
                    "httpHeaders": {
                        "Content-Type": "application/xml"
                    },
                    "httpParams": "<NETBOX-API sessionid=${response.call1.message.NETBOX._sessionid}><COMMAND name=\"SearchPersonData\" num=\"1\"><PARAMS></PARAMS></COMMAND></NETBOX-API>",
                    "httpContentType": "application/xml",
                    "httpMethod": "POST"
                },
                "listField": "NETBOX.RESPONSE.DETAILS.PEOPLE.PERSON",
                "keyField": "accountID",
                "colsToPropsMap": {
                    "name": "PERSONID~#~char",
                    "accountID": "PERSONID~#~char",
                    "status": "DELETED~#~char",
                    "customproperty1": "FIRSTNAME~#~char",
                    "customproperty2": "LASTNAME~#~char"
                },
                "statusConfig": {
                    "active": "FALSE",
                    "inactive": "TRUE"
                }
            }
        }
    }
}
7 REPLIES 7

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @sandeepsingh,

Can you please share the xml response along with debug log.

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Hi @sudeshjaiswal ,

Here you go.

@sandeepsingh  Could you please share the import log, and also enable the show log= true and share the import log.

 

If you find the above response useful, Kindly Mark it as "Accept As Solution".

 

"Date Timestamp (UTC)","Service Name","Class Name","Thread Name","Log Level","Message"
"2024-05-23T09:39:39.515+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-xrkrg","DEBUG","Calling Webservice Url - http://**.**.**.**/ahch/goforms/nbapi with httpParams - <NETBOX-API sessionid="${response.call1.message.NETBOX._sessionid}"><COMMAND name="SearchPersonData" num="1"><PARAMS></PARAMS></COMMAND></NETBOX-API>"
"2024-05-23T09:39:39.844+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-xrkrg","DEBUG","Got Webservice API Response: [headers:[Date: Thu, 23 May 2024 09:39:39 GMT, Server: Apache, X-Content-Type-Options: nosniff, X-Frame-Options: sameorigin, Content-Security-Policy: frame-ancestors 'self', Content-Type: text/xml, Vary: Accept-Encoding, Keep-Alive: timeout=5, max=100, Connection: Keep-Alive], responseText:<NETBOX><RESPONSE><APIERROR>5</APIERROR></RESPONSE></NETBOX>|, cookies:[], statusCode:200]"
"2024-05-23T09:39:39.482+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-xrkrg","DEBUG","Got Webservice API Response: [headers:[Date: Thu, 23 May 2024 09:39:39 GMT, Server: Apache, X-Content-Type-Options: nosniff, X-Frame-Options: sameorigin, Content-Security-Policy: frame-ancestors 'self', Content-Type: text/html;charset=utf-8, Content-Language: en, Content-Length: 1155, Keep-Alive: timeout=5, max=100, Connection: Keep-Alive], responseText:<!doctype html><html lang="en"><head><title>HTTP Status 406 – Not Acceptable</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 406 – Not Acceptable</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Description</b> The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.</p><hr class="line" /><h3></h3></body></html>, cookies:[], statusCode:406]"
"2024-05-23T09:39:39.156+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-xrkrg","DEBUG","Calling Webservice Url - http://**.**.**.**/ahch/goforms/nbapi with httpParams - <NETBOX-API><COMMAND name="Login" num="1"><PARAMS><USERNAME>SAVIYNT</USERNAME><PASSWORD=******/PASSWORD=******/PARAMS></COMMAND></NETBOX-API>"
"2024-05-23T09:30:00.708+00:00","ecm-worker","generic.GenericProvisioningService","quartzScheduler_Worker-4-xrkrg","DEBUG","Webservice response successfully received"
"2024-05-23T09:30:00.708+00:00","ecm-worker","generic.GenericProvisioningService","quartzScheduler_Worker-4-xrkrg","DEBUG","GenericProvisioningService - Calling REST callRestWebService : https://*************.saviyntcloud.com/ECMv6/api/userms/sync/endpointsAndEntitlements/173635?enableDeltaSync=true"
"2024-05-23T09:30:00.848+00:00","ecm-worker","generic.GenericProvisioningService","quartzScheduler_Worker-4-xrkrg","DEBUG","Webservice response successfully received"
"2024-05-23T09:30:00.101+00:00","ecm-worker","generic.GenericProvisioningService","quartzScheduler_Worker-4-xrkrg","DEBUG","GenericProvisioningService - Calling REST callRestWebService : https://*************.saviyntcloud.com/ECMv6/api/auth/login"

 

@sudeshjaiswal , here you go. seems session id is coming from call1 but is not passed to call2, we were able to see that in logs as well.

sandeepsingh_0-1716886025269.png

 

 

 

Hello @sandeepsingh,

You may refer this post for the construction of your json,
https://forums.saviynt.com/t5/identity-governance/not-able-to-get-list-of-objects-in-fieldlist-rest-... 

Thanks

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Hi @sudeshjaiswal ,

Its not a soap based app. but still tried no luck.

Hello @sandeepsingh,

In import json you cannot map attributes from call 1 response to call2, Hence it is not possible.

There is already an idea in place for the similar request would request you to vote and provide the valid bussiness use case on the same.
https://ideas.saviynt.com/ideas/EIC-I-5499 

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".