Skip to content

BigQuery external table on Google Drive: "Permission denied while getting Drive credentials" using service account in TablePlus #3740

@tainguyenuts

Description

@tainguyenuts

Summary
When connecting to BigQuery via TablePlus querying an external table linked to Google Drive results in a permission denied error.

Image

Access Denied: BigQuery BigQuery: Permission denied while getting Drive credentials.

Root Cause
This issue is caused by the service account not having the required Google Drive access scopes to read data from Drive into BigQuery.

Suggested Fix
Update the service account or authentication flow in TablePlus to include the following OAuth scope when using BigQuery:
https://www.googleapis.com/auth/drive.readonly
This scope allows BigQuery to access the Google Drive file used in the external table.

Environment
App: TablePlus
Database: BigQuery
Platform: MacOS

Additional Context
This error does not occur when using the BigQuery web UI or CLI with properly scoped credentials. It appears to be a limitation or missing support in how TablePlus handles BigQuery service account authentication.
Have same issue in Table Plus Windows TablePlus/TablePlus-Windows#730

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions