Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

ConnectionJson Salesforce

kyle
New Contributor
New Contributor

Hi There-

We have a need to create a REST Connector to our Salesforce instance to obtain entitlements that are stored in a custom object. I am able to run the required APIs through Postman. However, when I convert the calls into the connectionJson, something appears to be going wrong.

 

Below is the sample JSON with redactions:

{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"httpMethod": "POST",
"httpHeaders": {
"contentType": "application/json"
},
"httpContentType": "application/json",
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer abcd",
"testConnectionParams": {
"http": {
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"successResponses": {
"statusCode": [
200
]
}
}
}
}
}

Screenshot obtaining access_token:

kyle_0-1652400719334.png

Screenshot using the access_token to run test connection:

kyle_1-1652400890673.png

 

2 REPLIES 2

Miguel
Saviynt Employee
Saviynt Employee

Hello!  Thank you for your question!   We are investigating an answer. Someone will get back to you soon!

Thanks, Miguel

sahajranajee
Saviynt Employee
Saviynt Employee

Hello,

Please find below sample Connection JSON for Salesforce:

{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"url": "https://ap16.salesforce.com/services/oauth2/token?grant_type=refresh_token&client_id=123456&client_s...",
"httpMethod": "POST",
"httpParams": {},
"httpHeaders": {
"Accept": "application/json"
},
"httpContentType": "application/x-www-form-urlencoded",
"expiryError": "INVALID_SESSION_ID",
"authError": [
"INVALID_SESSION_ID"
],
"timeOutError": "Read timed out",
"errorPath": "errorCode",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"retryFailureStatusCode": [
401
],
"tokenType": "Bearer",
"accessToken": "Bearer abc"
}
}
}

 

 


Regards,
Sahaj Ranajee
Sr. Product Specialist