02/02/2023 10:07 AM - last edited on 02/02/2023 01:31 PM by Dave
Hi Team,
We are configuring Salesforce app ( Lightning ) followed steps mentioned the connector documentation. Test Connection is failing ( we checked connector - troubleshooting steps -In POSTMAN its generating access token correctly), here is the logs, any idea ?
DEBUG services.HttpClientUtilityService - Final connectionTimeoutConfig after guardRail validation: [connectionTimeout:10, readTimeout:120, writeTimeout:120, retryCount:3, retryWait:2]\n","stream":"stdout","time":"2023-02-02T17:40:25.179836408Z"}
DEBUG provisoning.SalesForceProvisioningService - callService url:\u003e\u003e\u003e\u003e\u003e\u003e https://b2c--uat.my.salesforce.com//services/oauth2/token\n","stream":"stdout","time":"2023-02-02T17:40:25.179887018Z"}
DEBUG services.HttpClientUtilityService - setting connection timeout to 10 seconds and request timeout to 120 seconds\n","stream":"stdout","time":"2023-02-02T17:40:25.180163126Z"}
DEBUG rest.RestUtilService - callService - responseStatusCode ::307\n","stream":"stdout","time":"2023-02-02T17:40:25.232631607Z"}
DEBUG provisoning.SalesForceProvisioningService - Error in getAccessToken:null\n","stream":"stdout","time":"2023-02-02T17:40:25.23274485Z"}
DEBUG println.PrintlnToLogger - Println :: \u001b[1;31m| Error \u001b[22;39mUnexpected character (T) at position 0.\u001b[m\n","stream":"stdout","time":"2023-02-02T17:40:25.232862836Z"}
DEBUG println.PrintlnToLogger - Println :: \u001b[1;31m| Error \u001b[22;39m\u0009at org.json.simple.parser.Yylex.yylex(Yylex.java:610)\u001b[m\n","stream":"stdout","time":"2023-02-02T17:40:25.233238077Z"}
[This post has been edited by a Moderator to remove sensitive information.]
02/02/2023 11:12 AM
What is the connection JSON you have used?
02/02/2023 02:07 PM
Salesforce default connector doesnt have ConnectionJSON.
02/02/2023 02:19 PM
It could be because of incorrect URL for Salesforce. We had similar issue and it turned out to be Salesforce changes the URL at their end. It was fixed after changing to correct URL.
02/02/2023 03:12 PM - edited 02/02/2023 03:14 PM
Hi Ritesh - Its working in POSTMAN ( Access token generating ) ,
do you think its an issue with Salesforce ?
02/02/2023 03:44 PM
Below is the link for the salesforce guide. Can you check if you have followed all the steps for Registering the Connector in Salesforce and the verify the value for your url and redirect uri
The logs show a responsecode of 307 which means the call is successfully being sent from Saviynt.
https://docs.saviyntcloud.com/bundle/SF-v2021x/page/Content/Preparing-for-an-Integration.htm
02/03/2023 06:32 AM
Yes, we had the same exact issue. Was getting tokens in postman but the connector was failing with same error message.
02/02/2023 07:46 PM
Yeah Sahil, its the same connector guide from fresh desk, we followed the same and its working postman but not in test connection.
Can you let me some more inputs on below - how to prove that its going fine from Saviynt
The logs show a responsecode of 307 which means the call is successfully being sent from Saviynt.
Note : Connector guide Document Correction Required - step 2.Select Enable for Device Flow. vs Screenshot
02/02/2023 08:43 PM
Can you please confirm if the parameters CLIENT_ID/CLIENT_SECRET/REFRESH_TOKEN/REDIRECT_URI/INSTANCE_URL are configured correctly.
Also, consent for OAuth authorization is performed correctly?
02/03/2023 06:12 AM
Yeah Manu those are correct , POSTMAN screen shot has the same.
Can you elaborate this ?
consent for OAuth authorization is performed correctly?
02/03/2023 06:59 AM
Its a pre requisite step to be followed for token generation.
02/03/2023 10:20 AM - edited 02/03/2023 10:20 AM
yeah we have done that- so the POSTMAN is generating token able to get users from api in postman.
02/03/2023 11:24 AM
You have issue in URL it seem you have added two //
02/03/2023 01:48 PM
extra slash (/) added from the instance URL, if https://abc.salesforce.com/ i have removed that (https://abc.salesforce.com)as well PFB logs , but the error is same. if urls is incorrect it should give 400,404 error instead of 307 - i am not get clue on why is Saviynt to return 307 here
provisoning.SalesForceProvisioningService - callService url:\u003e\u003e\u003e\u003e\u003e\u003e https://xxxxxx--uat.my.salesforce.com/services/oauth2/token\n","stream":"stdout","time":"2023-02-03T20:54
services.HttpClientUtilityService - setting connection timeout to 10 seconds and request timeout to 120 seconds\n","stream":"stdout","time":"2023-02-03T20:54:22.512878844Z"}"
rest.RestUtilService - callService - responseStatusCode ::307\n","stream":"stdout","time":"2023-02-03T20:54:22.579408359Z"}"
provisoning.SalesForceProvisioningService - Error in getAccessToken:null\n","stream":"stdout","time":"2023-02-03T20:54:22.579475585Z"}"
println.PrintlnToLogger - Println :: \u001b[1;31m| Error \u001b[22;39mUnexpected character (T) at position 0.\u001b[m\n","stream":"stdout","time":"2023-02-03T20:54:22.579601436Z"}"
println.PrintlnToLogger - Println :: \u001b[1;31m| Error \u001b[22;39m\u0009at org.json.simple.parser.Yylex.yylex(Yylex.java:610)\u001b[m\n","stream":"stdout","time":"2023-02-03T20:54:22.579933639Z"}"
02/03/2023 02:29 PM
Then somewhere you have T in parameters thats issue