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

Salesforce connection failed

sksuresh2k30
Regular Contributor
Regular Contributor

I am getting a connection failure issue while connecting the Salesforce OOTB connector, I have attached the log for reference. 

[This post has been edited by a Moderator to remove sensitive information.]

32 REPLIES 32

stalluri
Valued Contributor II
Valued Contributor II

@sksuresh2k30 

Can you please share the logs in a Text file?

Can you also show the error you are seeing from UI.


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

You can edit the login text, and please find the error message.

sksuresh2k30_0-1725576539138.png

[This post has been edited by a Moderator to remove sensitive information.]

 

 

@sksuresh2k30 

Can you confirm if the credentials are working successfully from Postman?

Did you uncheck the "Require Secret for Refresh Token Flow"  option which is part of Salesforce configuration

Regards,
Sumathi Somala

If this reply answered your question, please Accept As Solution and give Kudos.

rushikeshvartak
All-Star
All-Star

Did you validated with postman?

please share connection configuration screenshot 


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

I'm using ootb connection 

Can you provide requested information 


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

@sksuresh2k30  Please point out to error found in logs. Logs file does not have any error .

Also making sure you mask PII information in logs when sharing

‼️‼️⚠️Keep company-specific private information masked on public forums, such as the name and URL.⚠️‼️‼️


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

Tested via postman and It succeeded

sksuresh2k30_0-1725628775199.pngsksuresh2k30_1-1725629130150.png

 

 

Does redirect url is correct in saviynt ?

rushikeshvartak_0-1725629328543.png

 


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

Is this not format for redirect url?

  1. Specify Callback URL as<https://<Salesforce> Site URL>/services/oauth2/success.

sksuresh2k30_0-1725629516466.png

 

Its based on what you defined when creating salesforce client. Validate with salesforce team


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

This is the configuration for salesforce 

sksuresh2k30_0-1725629729010.png

 

This looks correct share logs


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

Attached the log for your review 

[This post has been edited by a Moderator to remove sensitive information.]

"ecm","2024-09-06T13:38:23.913+00:00","{"log":"2024-09-06 13:38:23,305 [http-nio-8080-exec-15] DEBUG provisoning.SalesForceProvisioningService - Access token is not generated

Generate new access token from postman and update


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

I've tried multiple times , Also I need to ensure that the Salesforce OOTB connector setup is configured correctly.

Validate if there are whitespace in end or start of values


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

Verified and no space , But still the same issue 

"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,597 [http-nio-8080-exec-1] DEBUG services.ImportUtilityService - EntitlementType 'ApexClass' for Endpoint 'Salesforce' found with EntitlementTypekey - 264\n","stream":"stdout","time":"2024-09-06T14:13:32.597220481Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,598 [http-nio-8080-exec-1] DEBUG services.ImportUtilityService - EntitlementType 'ApexPage' for Endpoint 'Salesforce' found with EntitlementTypekey - 265\n","stream":"stdout","time":"2024-09-06T14:13:32.59862918Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,599 [http-nio-8080-exec-1] DEBUG services.ImportUtilityService - EntitlementType 'AppMenuItem' for Endpoint 'Salesforce' found with EntitlementTypekey - 266\n","stream":"stdout","time":"2024-09-06T14:13:32.600030156Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,602 [http-nio-8080-exec-1] DEBUG services.ImportUtilityService - EntitlementType 'ConnectedApplication' for Endpoint 'Salesforce' found with EntitlementTypekey - 267\n","stream":"stdout","time":"2024-09-06T14:13:32.602103411Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,603 [http-nio-8080-exec-1] DEBUG services.ImportUtilityService - EntitlementType 'Standard Application' for Endpoint 'Salesforce' found with EntitlementTypekey - 268\n","stream":"stdout","time":"2024-09-06T14:13:32.603502915Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,604 [http-nio-8080-exec-1] DEBUG services.ImportUtilityService - EntitlementType 'Custom Application' for Endpoint 'Salesforce' found with EntitlementTypekey - 269\n","stream":"stdout","time":"2024-09-06T14:13:32.604886271Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,606 [http-nio-8080-exec-1] DEBUG services.ImportUtilityService - EntitlementType 'NamedCredential' for Endpoint 'Salesforce' found with EntitlementTypekey - 270\n","stream":"stdout","time":"2024-09-06T14:13:32.606303728Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,607 [http-nio-8080-exec-1] DEBUG services.ImportUtilityService - EntitlementType 'ExternalDataSource' for Endpoint 'Salesforce' found with EntitlementTypekey - 271\n","stream":"stdout","time":"2024-09-06T14:13:32.607672281Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,608 [http-nio-8080-exec-1] DEBUG services.ImportUtilityService - EntitlementType 'CustomPermission' for Endpoint 'Salesforce' found with EntitlementTypekey - 272\n","stream":"stdout","time":"2024-09-06T14:13:32.6092351Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,610 [http-nio-8080-exec-1] DEBUG services.ImportUtilityService - EntitlementType 'ObjectPermissions' for Endpoint 'Salesforce' found with EntitlementTypekey - 273\n","stream":"stdout","time":"2024-09-06T14:13:32.610415643Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,610 [http-nio-8080-exec-1] DEBUG provisoning.SalesForceProvisioningService - callService url:\u003e\u003e\u003e\u003e\u003e\u003e https://xxxxxxxxxxxx.develop.my.salesforce.com/services/oauth2/token\n","stream":"stdout","time":"2024-09-06T14:13:32.610446199Z"}"
"ecm","2024-09-06T14:13:32.913+00:00","{"log":"2024-09-06 14:13:32,739 [http-nio-8080-exec-1] DEBUG provisoning.SalesForceProvisioningService - Access token is not generated successfully\n","stream":"stdout","time":"2024-09-06T14:13:32.739300398Z"}"

[This post has been edited by a Moderator to remove sensitive information.]

Do you have extra Slash on end of token url ?

‼️‼️⚠️Keep company-specific private information masked on public forums, such as the name and URL.⚠️‼️‼️


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

I`m sorry where should I check the token url?

sksuresh2k30_0-1725633008952.png

[This post has been edited by a Moderator to remove sensitive information.]

stalluri
Valued Contributor II
Valued Contributor II

@sksuresh2k30 

Can you please tell me what is the target Application( Salesforce Classic or Salesforce Lightning)


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

Salesforce Classic

 

 

Amit_Malik
Valued Contributor II
Valued Contributor II

Is this first time you are setting up this connector or it stopped working?

Where have you got Refresh token from ? through postman ? 

To generate a refresh token , you would need a AuthCode right ? who gave you the auth code.

It might be issue with your refresh token I think. Can you show in postman that you can get a refresh token using these credentials or using existing refresh token

 

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".

Is this first time you are setting up this connector or it stopped working?

//Yes, this is the first time for setting up a connection

Where have you got Refresh token from ? through postman ? 

// I have generated the refresh token from Salesforce

To generate a refresh token , you would need a AuthCode right ? who gave you the auth code.

//Not sure about the auth code 

It might be issue with your refresh token I think. Can you show in postman that you can get a refresh token using these credentials or using existing refresh token

//

sksuresh2k30_0-1725635698912.png

[This post has been edited by a Moderator to remove sensitive information.]

stalluri
Valued Contributor II
Valued Contributor II

@sksuresh2k30 
https://docs.saviyntcloud.com/bundle/Salesforce-v24x/page/Content/Preparing-for-an-Integration.htm

  1. Before generating the refresh token, change the setting to prevent the generated refresh token to expire immediately after being created. To do so:

    1. On the details page of the newly created app, click Manage.

    2. Select the Refresh token is valid until revoked option.

      Warning

      If the Immediately expire refresh token option is selected, the refresh token expires as soon as it is generated, which results in connection failure.

    3. Click Save.

  2. Construct the following URL to provide the consent for OAuth authorization:

    https://<Salesforce site URL>/services/oauth2/authorize?response_type=token&client_id=<client id>&redirect_uri=<redirect uri>

  3. The following message appears:

    Changes can take up to 10 minutes to take effect. Deleting a parent org also deletes all connected apps with OAuth settings enabled.

  4. Access the URL constructed in Step 8 after say 10 minutes.

  5. Click Allow to provide your consent for this OAuth application to access the target application.

     

     

  6. In the screen that displays, note the URL from the browser’s address bar. The URL contains the refresh token used for connecting to the target application.

    https://<Salesforce site URL>/services/oauth2/success#access_token=00Dj0000000L5GP%21AREAQExclQZvpLbntuMBZjlIojX0I03nsNvTrftk.Oa1bZOZO_PH0x0d4DCM7CzEjJVSeYNNqWIDOsbJpfwlHvbQmkKfxA3T&refresh_token=5Aep861E3ECfhV22naWzJF4DykHs5cM4jUjKyTIqqg_fy20kKKpQjjM6ave57H9T3CwgULDn9RMmXw1a6VTmF2_&instance url=https%3A%2F%2Fna16.salesforce.com&id=https%3A%2F%2Flogin.salesforce.com%2Fid%2F00Dj0000000L5GPEA0%2F005j0000000SIkiAAG&issued_at=1450329711823&signature=Wwd2tTl243RSm%2BWEwz9Utm3M0NrdHTmMvvYsGRSnSho%3D&scope=id+api+web+full+chatter_api+visualforce+refresh_token+openid+custom_permissions+wave_api&token_type=Bearer


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

I am not clear this step , Where should i update the constructed url 

https://xxxxxxxx.develop.my.salesforce.com/services/oauth2/authorize?response_type=token&client_id=xxxxxxxxN&redirect_uri=https://xxxxxxxx.develop.my.salesforce.com/services/oauth2/success

[This post has been edited by a Moderator to remove sensitive information.]

stalluri
Valued Contributor II
Valued Contributor II

@sksuresh2k30 

Please follow the document below from:

Registering the Connector in Salesforce Classic


https://docs.saviyntcloud.com/bundle/Salesforce-v24x/page/Content/Preparing-for-an-Integration.htm


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

Its works , The resolution is to get the refresh token from https://<Salesforce site URL>/services/oauth2/authorize?response_type=token&client_id=<client id>&redirect_uri=<redirect uri> out put, Thank you 

stalluri
Valued Contributor II
Valued Contributor II

@sksuresh2k30 
Please consider selecting Accept As Solution and clicking on the kudos button. It will help new users to review this post.


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

Amit_Malik
Valued Contributor II
Valued Contributor II

Please accept the solutions that would have helped you so that it can help others also. Thank you!

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".

Amit_Malik
Valued Contributor II
Valued Contributor II

Not update anywhere. The client id or app created in Salesforce needs consent. The constructed url, you can just hit in any browser and allow / give consent.

Do you have anyone from Salesforce working with you. They generally know this stuff as Saviynt is not the only one using there APIs.

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".

Dave
Community Manager
Community Manager

Thread Closed - Solution Accepted!

This thread has been closed as the original issue has been successfully resolved.

To maintain a clean and organized forum, we ask that any new issues or questions be posted in a new thread. This helps keep discussions focused and makes it easier for others to search and find relevant solutions.

Thank you for your understanding and cooperation!