Tableau / Tableau Cloud
Tableau Cloud REST API: Updating a data source connection from OAuth to Key-Pair auth returns 200 OK but does not embed credentials
Summary
When using the Tableau REST API "Update Data Source Connection" endpoint to change a data source connection's authentication type from OAuth to Key-Pair (auth-keypair) with embedPassword=true, the API returns HTTP 200 OK, but the Key-Pair credentials are not actually persisted server-side. This issue occurs exclusively when the data source was originally published using OAuth authentication. After the API call, the connection UI shows "No authentication" and any extract refresh or dashboard viewing fails with a credential error.
Workaround
- Download the workbook from Tableau Cloud
- Open it in Tableau Desktop
- In the publish dialog make sure that Authentication is set to "Embed <keypair user>" and republish to Tableau Cloud
Note: There is no automated workaround using the REST API
Steps to reproduce
1. Publish a data source to Tableau Cloud with OAuth authentication embedded (e.g., a Snowflake OAuth data source).
2. In My Account Settings > Saved Credentials for Data Sources, add Key-Pair credentials for the same data source connection.
3. Call the REST API "Update Data Source Connection" endpoint to switch the authentication type to Key-Pair:
PUT /api/3.29/sites/{site_id}/datasources/{datasource_id}/connections/{connection_id}
<tsRequest>
<connection
userName="[Username]"
authenticationType="auth-keypair"
embedPassword="true"/>
</tsRequest>
4. Note the API returns HTTP 200 OK.
5. Open the data source's connection settings in the Tableau Cloud UI — the Edit Connection dialog shows "No authentication" selected instead of the expected embedded credentials.
6. Trigger an extract refresh on the data source — The refresh fails with "Could not find the private key for Snowflake KeyPair Auth"
Error details
Could not find the private key for Snowflake KeyPair Auth
History
Description updated
Nov 30, 2026
First tracked here as Solution Deployed
Nov 30, 2026