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

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,

 

9 REPLIES 9

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

sandeepsingh
New Contributor III
New Contributor III

@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...

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.‼️‼️⚠️


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

Hi @rushikeshvartak , Here you go.