Renier Botha
Renier Botha

Reputation: 980

Cannot update DataStudio resource connection to use service account

I have a DataStudio dashboard which contains a dataset resource connection to a BigQuery table which is currently authenticated using an individual user's account.

I want to change that to use a service account.

In order to do that, I followed this guide, which means I have:

  1. Created a service account
  2. Added the BigQuery Job User role to the service account
  3. Added the Service Account Token Creator role to the service account
  4. Added the BigQuery Data Viewer role to the service account (associated to the correct BigQuery table)
  5. Ensured that my account is added as a Service Account User on the service account

On the DataStudio dashboard, I then navigate to:

Resource > Manage Added Data Sources > Select the specific data source > Click on the blade with the current user account being used to authenticate.

When I try to insert the service account details in the window, I see the error message below.

Adding service account to resource

I've followed the link (which leads back to the original guide). The link says I need to add the Service Account Token Creator to the service account, which I've confirm through the following:

enter image description here

Now I'm stumped! What could be the reason why I cannot authenticate the connection using the service account?

Upvotes: 3

Views: 1079

Answers (1)

Renier Botha
Renier Botha

Reputation: 980

I figured it out.

The problem was that the Service Account Token Creator role was assigned to the service account and not the service agent.

This link describes the process of setting up a service account for authenticating Data Studio data sources. Although it's got all the info there, the devil is in the detail in Step 2: Allow the Looker Studio service agent to access your service account.

Upvotes: 6

Related Questions