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

Assistance Required: Dealing with Error in REST Connector ConnectionJSON with Text/XML Input

AtrayeeDutta
Regular Contributor
Regular Contributor

Hi Team,

I'm reaching out for assistance with an issue we're encountering in Saviynt while trying to import data in text/XML format from our target. We're running into an error in ConnectionJSON, specifically: "Cannot get property 'userName' on null object", after executing the account import job.

We have converted our XML data to JSON using an online converter for ease of definition and readability. Here's a snapshot of what our XML looks like:

 

<NETBOX-API>
<COMMAND name="Login" num="1">
<PARAMS>
<USERNAME>xxxxxxx</USERNAME>
<PASSWORD>xxxxxxx</PASSWORD>
</PARAMS>
</COMMAND>
</NETBOX-API>

Upon conversion, this becomes:
{
"NETBOX-API": {
"COMMAND": {
"PARAMS": {
"USERNAME": "xxxxx",
"PASSWORD": "xxxxx"
},
"_name": "Login",
"_num": "1"
}
}
}

and finally, here is our current ConnectionJSON configuration:
{
"authentications": {
"acctAuth": {
"authType": "Basic",
"url": "http://10.00.000.00/XXXXXXXXXXXXXX",
"httpMethod": "POST",
"httpParams": {
"NETBOX-API": {
"COMMAND": {
"PARAMS": {
"USERNAME": "xxxxxxx",
"PASSWORD": "xxxxxxxx"
},
"_name": "Login",
"_num": "1"
}
}
},
"httpHeaders": {},
"httpContentType": "text/xml",
"expiryError": "Couldn't authenticate you",
"authError": [
"Couldn't authenticate you"
],
"timeOutError": "Read timed out",
"errorPath": "error",
"maxRefreshTryCount": 5,
"tokenResponsePath": "_sessionid",
"tokenType": "Basic",
"accessToken": "_sessionid"
}
}
}

We've attached the specific errors we're encountering. Any help or advice on this issue would be appreciated.


Regards,

 

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

Please share curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

curl --location 'http://10.00.000.00/xxxxxxxxxxxxx ' \
--header 'Content-Type: application/xml' \
--data '<NETBOX-API>
<COMMAND name="Login" num="1">
<PARAMS>
<USERNAME>xxxx</USERNAME>
<PASSWORD>xxxx</PASSWORD>
</PARAMS>
</COMMAND>
</NETBOX-API>'

[This message has been edited by moderator to mask url]

Hi Team,

Could you please assist on the issue?

Please add testConnectionParams In Connection JSON and share logs 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

I have attached the logs, tried with below connection as well,

{
    "authentications": {
        "acctAuth": {
            "authType": "Basic",
            "url": "http://xxxxx/xxxx/xxxx",
            "httpMethod": "POST",
            "properties": {
                "userName": "xxxx",
                "password": "xxxx"
            },
            "httpHeaders": {
                "Content-Type": "application/xml"
            },
            "httpParams": {
                "NETBOX-API": {
                    "COMMAND": {
                        "PARAMS": {
                            "USERNAME": "xxxx",
                            "PASSWORD": "xxxxx"
                        },
                        "_name": "Login",
                        "_num": "1"
                    }
                }
            },
            "httpContentType": "application/xml",
            "expiryError": "Couldn't authenticate you",
            "authError": [
                "Couldn't authenticate you"
            ],
            "timeOutError": "Read timed out",
            "errorPath": "error",
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "NETBOX._sessionid",
            "tokenType": "Basic",
            "accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        }
    }
}

Your Server is not reachable from Saviynt

I/O error on POST request


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

sandeepsingh
New Contributor
New Contributor

@rushikeshvartak server is reachable. Saviynt is not able to take sessionid from the response.

https://forums.saviynt.com/t5/application-access-governance/not-able-to-export-session-id-from-respo...