Skip to main content

I'm receiving a "Permission denied while getting Drive credential" error when trying to query from Google Drive?

If you're seeing the below error when you try to query a dataset from a Google Drive document in the IDE, the IDE due to the below error message, we'll do our best to get you unstuck with the below steps!

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

Usually, this error indicates that you haven't granted the BigQuery service account access to the specific Google Drive document. If you're seeing this error, try giving the service account (client email seen here) you are using for your BigQuery connection in dbt Cloud, permission to your Google Drive or Google Sheet. You'll want to do this directly in your Google Document and click the 'share' button and enter the client email there.

If you are experiencing this error when using OAuth, and you have verified your access to the Google Sheet, you may need to grant permissions for gcloud to access Google Drive:

gcloud auth application-default login --disable-quota-project

For more info see the gcloud auth application-default documentation

If you've tried the steps above and are still experiencing this behavior - reach out to the Support team at support@getdbt.com and we'll be happy to help!

0