Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

google.auth.default ignores provided scopes when application default credentials are an authorized user. #805

Closed
Assignees
tswast
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.type: docsImprovement to the documentation for an API.
@ipear3

Description

@ipear3

Environment details

  • OS: macOS Big Sur version 11.4
  • Python version: 3.8.2
  • pip version: 21.1.3
  • google-auth version: 1.33.1

Steps to reproduce

  1. Confirm application default credentials are an authorized user (env var GOOGLE_APPLICATION_CREDENTIALS is not set, and gcloud auth application-default login has been run and quota project has been added to ADC)
  2. Run the code from the guide "Querying Drive Data"
from google.cloud import bigqueryimport google.auth# Create credentials with Drive & BigQuery API scopes.# Both APIs must be enabled for your project before running this code.credentials, project = google.auth.default(  scopes=[      "https://www.googleapis.com/auth/drive",      "https://www.googleapis.com/auth/bigquery",  ])# Construct a BigQuery client object.client = bigquery.Client(credentials=credentials, project=project)
  1. Inspect the credentials and client variables. Neither will contain the drive scope provided.
    OR
  2. Attempt to run a query that references a drive-sourced table and receive the error:google.api_core.exceptions.Forbidden: 403 Access Denied: BigQuery BigQuery: Permission denied while getting Drive credentials.

The user I am authenticating as has viewer permissions for the sheet in question.

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.type: docsImprovement to the documentation for an API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp