Set up OAuth for Google

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

Complete these steps for each Tableau Server instance.

Note Before you complete these steps, make sure you have completed the prerequisites described in Preparing for Configuring OAuth Support.

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 in the Google Developers Console Help.

  1. Sign in to Google Cloud Platform, and then click Go to my console.

  2. On the drop-down menu next to the Google Cloud Platform title, 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, and navigate to APIs Manager > Credentials.

    Note: You must generate credentials with the Google API Manager for Tableau Server. Do not attempt to use a Service Account, which generates a key, and is not supported.

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

  6. Click the Credentials tab, then click the Create credentials drop-down list, and then select OAuth client ID. Complete the following:

    • 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

    The pending-changes apply command displays a prompt to let you know this will restart Tableau Server if the server is running. The 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. 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.

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. Try again or send us a message.