Is there a way to refresh Salesforce OAUTH Token?

since a couple days all of my datasets with a connection to Salesforce won’t refresh anymore.
The error message states that the OAUTH token is not valid anymore but so far I haven’t found a solution to refresh it.
In Quicksights useremanual it says that you can’t edit a Saleforce connection.

My question now is: How do I solve this problem besides recreating all of my data sets?

→ I am able to do a manual refresh but I noticed that a significant amount of data is missing in that way.

My case is similar to the following that has been closed without a solution: Whats the best way to refresh Oauth Credentials for a Salesforce dataset?

This is the error message:
Ingestion Id: 9215e3b3-8974-4c74-9297-05c57099692b

Error type: 100281

Error details: [Simba]Salesforce Salesforce server error : Error code: 117 ErrorMessage: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session hash: W1RX05nfbyy0mxIUV2zepr6nmKl8kkQDo97OvGjC+zQ= This error usually occurs after a session expires or a user logs out. Decoder: DataInDbSessionKeyDecoder

Hey Samelka,
I posted the case you referenced, and after consulting with AWS the solution was to recreate all my data sets.
My error was slightly different than yours because even manual refreshes would fail.
In Salesforce, I recommend you check three fields in the connected App Quicksight uses(See image below):
Permitted users should be: All users may Self-Authorize
IP relaxation should be: Relax IP Restrictions
Refresh Token Policy SHould be: Refresh token is valid until revoked.

If you make these changes and then try to refresh your dataset it may help your issue because the new settings will be utilized as long as your SF token for that application hasn’t been revoked.

1 Like

Thank you for your comment.
I did the same but it was only a temporal solution.

Now my token expieres again and again and I can’t find a solution.
I don’t understand why this happens now since we haven’t faced this problem before and havent changed anything in our settings

Hi folks - Did you all have to create the Quicksight connected app on your own or was one installed when you initially authenticated?
If the former - what was the name of the connected app that was created by Quicksight?

I realize I am replying to an older thread, but I thought I would post about how I resolved this issue for me in case someone needs it in the future.

To adjust the Salesforce connected app go to the following. The connected app installs in your salesforce instance after you connect via OAuth.

1.) In Salesforce Classic go to Setup > Manage Apps > Connected Apps OAuth Usage
2.) Find the connected app starting with “QuickSight”. In my instance it was QuickSight_IAD_Prod but I am guessing it might be different depending on what location your quicksight instance is in.
3.) Click the “install” button to the right of the Actions section to the right.
4.) After the app installs then you should see a “Manage App Policies” link.
5.) Click the “Manage App Policies” link and then you can set the policies in daniel.kemp1389 post above.

Just noting that it is March 2023 and we still can’t update the Data Source for Salesforce. Re-creating the Datasets is a painful solution.