KNOWLEDGE BASE

Error "Unable to connect to the data source" Or "User(s) do not have permission to access datasource" Accessing Published Workbooks


Published: 18 Dec 2017
Last Modified Date: 21 Apr 2020

Issue

When opening views that use published data sources, the following error might occur:
 
"Unable to connect to the data source.
Try connecting again. If the problem persists, disconnect from the data source and contact the data source owner."
Or

"DataServiceFailure
Unable to connect to the server "localhost". Check that the server is running and that you have the access privileges to the requested database."

 
Or
User(s) do not have permission to access datasource.
There was an error with the data source "[DataSourceName]". Verify that the data source is configured correctly.

Environment

  • Tableau Online
  • Tableau Server

Resolution

Option 1

As the site administrator or data source owner, grant the affected user the 'Connect' permission for the published data source. 

Option 2

Republish the workbook using Embedded password for the published data source(s).
  1. Open the affected published workbook in Tableau Desktop. See Open a published workbook from the server for steps. 
  2. Republish the workbook and ensure the Authentication setting for all published data sources are set to Embedded password. See Set Credentials for Accessing Your Published Data for more information. 

Option 3

Re-save the workbook using web authoring and embed credentials. 
  1. As the workbook author or site administrator, edit the workbook using web authoring. See Edit Tableau Views on the Web for steps.
  2. Select File, and Save As...
  3. Give the workbook the same name as the existing workbook to overwrite it, and select the Embed password for data source box. 
  4. Select Save.

Cause

The affected user has not been granted permission to connect to the published data source, or some of the published data source(s) in the workbook are set to Prompt User instead of Embedded password. 
 
Did this article resolve the issue?