Change Google OAuth to Saved Credentials

By default, the Google Analytics, Google Query, and Google Sheets connectors use a managed keychain for OAuth tokens that are generated for Tableau Server by the provider and shared by all users in the same site.

You can convert the connectors that use managed keychain to use saved credentials by configuring Tableau Server with an OAuth client ID and secret for each connector.

For more information about managed keychain and saved credentials, see OAuth Connections.

This topic describes how to set up your Google BigQuery, Google Sheets, and Google Analytics data sources for OAuth with saved credentials.

Complete these steps for each Tableau Server instance.

Set up OAuth by following these three procedures:

  • Enable API access and create access token from Google.
  • Configure OAuth on Tableau Server.
  • Create and edit Google data source.

Obtain a Client ID and Enable Google APIs

Note These steps reflect the settings in the Google Cloud Platform console at the time of this writing. For more information, see Using OAuth 2.0 for Web Server Applications(Link opens in a new window) in the Google Developers Console Help.

  1. Sign in to Google Cloud Platform(Link opens in a new window), and then click Go to my console.

  2. On the drop-down menu, Select a Project, select Create project.

  3. In the new project form that appears, complete the following:

    • Give the project a meaningful name that reflects the Tableau Server instance for which you’ll use this project.

    • Determine whether you want to change the project ID.

      Note After you create the project, you will not be able to change the project ID. For information, click the question mark icons.

  4. Open the new project, navigate to APIs & Services > OAuth consent screen. and select the User Type.

  5. Click the OAuth consent screen tab and then enter a meaningful name for Product name shown to users.

  6. On the OAuth consent screen, you must fill out the required fields. Follow the steps to authorize your OAuth tokens:

    • Select Web Application.

    • For Authorized JavaScript Origins, enter the local computer name of your Tableau Server.

    • For Authorized Redirect URI, replace the existing text with the Internet address for your server, and add the following text to the end of it: auth/add_oauth_token. For example:

  7. Copy the Authorized Redirect URI, and paste it in a location that you can access from your Tableau Server computer.

  8. Click Create .

  9. Copy the following values that Google returns, and paste them in a location that you can access from your Tableau Server computer:

    • Client ID

    • Client secret

  10. In APIs ManagerDashboards, verify that BigQuery APIGoogle Drive API (to enable Google Sheets) or Analytics API is enabled. To enable APIs, click ENABLE API at the top of the page.

Configure Tableau Server for Google OAuth

Using the information you obtained by completing the steps in Obtain a Client ID and Enable Google APIs, configure your Tableau Server:

  • On the Tableau Server computer, open the shell and run the following commands to specify the access token and URI:

    tsm configuration set -k -v <your_client_ID>

    tsm configuration set -k -v <your_client_secret>

    tsm configuration set -k -v <your_authorized_redirect_URI>

    tsm pending-changes apply

    If the pending changes require a server restart, the pending-changes apply command will display a prompt to let you know a restart will occur. This prompt displays even if the server is stopped, but in that case there is no restart. You can suppress the prompt using the --ignore-prompt option, but this does not change the restart behavior. If the changes do not require a restart, the changes are applied without a prompt. For more information, see tsm pending-changes apply.

Create and edit Google data source

Next, you must publish the Google data sources to the server. See the Tableau Desktop topic, Google BigQuery(Link opens in a new window).

After you've published the data sources, the final step is to edit the data source connection to use the embedded access token that you configured earlier. See Edit Connections on Tableau Server.

Managing access tokens

After you configure the server for OAuth, you can allow users to manage their own access tokens in their profile settings, or you can manage the tokens centrally. For more information, see Allow Saved Access Tokens.

Thanks for your feedback! There was an error submitting your feedback. Please try again.