OAuth 2.0 for Google Sheets
This section describes the steps to configure the Trifacta Application to integrate with Google Sheets using OAuth 2.0 to authenticate.
OAuth 2.0 authentication must be enabled in theDesigner Cloud Powered by Trifacta platform.
An OAuth 2.0 client is required for Designer Cloud Powered by Trifacta Enterprise Edition only.
For more information, seeEnable OAuth 2.0 Authentication.
You must enable external access to the project containing your Google Sheets data.
Note
This step configures access through the consent screen for your project. If you have already done this step for the project, you can skip this section.
Steps:
Navigate to the Google Console for your project: https://console.cloud.google.com/.
From the left menu, select APIs & Services > OAuth consent screen.
For User Type, select External.
Click Create.
You can provide a logo and name for this client. For example:
Tip
You can use your own logo and product name if preferred.
Right-click the logo in the Trifacta Application and download it to your desktop. Right-click the image and select Save As.... Upload it to the consent screen.
The name of the product can be: Designer Cloud Powered by Trifacta Enterprise Edition.
Do not add Scopes or Test Users.
Save your changes.
You must create a set of credentials to use when accessing your Google project.
Steps:
From the APIs & Services menu, select Credentials.
At the top of the screen, click +CREATE CREDENTIALS.
Select OAuth client Id.
For Application type, select Web application.
Fill the values for the following settings:
Setting
Value
Name
Provide a descriptive name. Example:
Google_Analytics
Authorized JavaScript origins
Do not add a value for this setting.
Authorized Redirect URIs
Set the value to the following:
https://<platform_url>:<port_number>/oauth2/callback
Click Create.
Retain the values for ClientId and Client Secret. These values must be applied in the Trifacta Application.
You must enable API access to your project.
Steps:
To enable the Google Sheets API, navigate to the following URL:
https://console.cloud.google.com/apis/library/sheets.googleapis.com
Click Enable.
To use Google Sheets, you must also enable the Google Drive API. Navigate to the following URL:
https://console.cloud.google.com/apis/library/drive.googleapis.com
Click Enable.
After the Google Sheets app is created, you must create an OAuth 2.0 client in the Trifacta Application, which is used to integrate with the OAuth 2.0 connected app that you created above.
Note
You must create one OAuth 2.0 client in the Trifacta Application for each Google Sheets connected app that you wish to use.
Steps:
Login to the Trifacta Application as a workspace administrator.
In the lefthand menu, select User menu > Admin console > OAuth2.0 Clients.
In the OAuth2.0 Clients page, click Register OAuth2.0 Client.
Specify the new client. Apply the following values:
Setting
Description
Type
Set to
google_sheets
.Name
Display name for the OAuth 2.0 client in the Trifacta Application.
Client ID
Set this value to the Client Id value that you retained from your Google Sheets app.
Client Secret
Set this value to the Client Secret value that you retained from yourGoogle Sheetsapp.
Authorization URL
Set this value to the following:
https://accounts.google.com/o/oauth2/v2/auth
Token URL
Set this value to the following:
https://oauth2.googleapis.com/token
Scopes
Please insert the following value:
https://www.googleapis.com/auth/drive.readonly
Access Token Expires In
Set this value (in milliseconds) to
3600000
(1 hour).Refresh Token Expires In
Set the value to
0
(does not expire).To save your OAuth 2.0 client, clickSave.
For more information, see Create OAuth2 Client.
After you have created the two OAuth 2.0 client references, you can create a connection to your Google Sheets data.
Note
You must create a separate connection for each OAuth 2.0 client that is available in the Trifacta Application.
For more information, see Google Sheets Connections.