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

Unable to pass Static username and password in Import account JSON for Rest connector

Mohit_Sanka
New Contributor III
New Contributor III

Hi Team,

We are connecting to an application via Rest api's which expects to pass the username and password in the call.

When tested via postman we have to pass it under Authorization tab as basic authorization and it doesn't work when we try to pass the data in Headers or params.

we have tried the below JSONs but still didn't worked.

1) Trying to pass the username & password in params in Account import JSON

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/persons?query=networkLoginName=='aa '",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {},
"httpParams": {
"userName": "${connection.userName}",
"password": "${connection.password}"
}
},
"listField": "",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "networkLoginName~#~char"
}
}
}
}
}

 

2) Tried to pass the username and password in headers

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/persons?query=networkLoginName=='aa '",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"userName": "${connection.userName}",
"password": "${connection.password}"
}
},
"listField": "",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "networkLoginName~#~char"
}
}
}
}
}

 

In both the cases we are getting 401 error as it was unable to pass the data in the API call.

 

Can anyone help us with a sample JSON that can used in this case.


Thanks & Regards,

Mohit.

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

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

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 Rushikesh,

It got resolved. Thanks for the support.

Regards,

Mohit.

Sunil
Community Manager
Community Manager

@Mohit_Sanka To help others who may have a similar issue, could you please share the issue cause and its solution?