Hello,
User A is creating a query in bq and then user B wants to read the data (using job ID and location).
User B gets : User does not have permission to access results of another user's job.
User B has the bq admin role assigned.
Which permissions are necessary for user B to access the data of the job created by user A ?
Solved! Go to Solution.
By default, BigQuery jobs and their results are private to the user who created them. Even with the BigQuery Admin
role, a user cannot directly access the results of another user's job unless explicitly granted permission.
There are a few ways to allow User B to access the results of User A's job:
Share the Job: User A can share the job itself with User B. This allows User B to view the job details, query, and results. To share the job:
Persist Results to a Table: The most common solution is for User A to save the job results into a permanent table. User B can then be granted permissions (e.g., BigQuery Data Viewer
or BigQuery Reader
) on that table to access the data.
Grant bigquery.jobs.get
Permission:
Use Authorized Views:
Implementing Permissions
To grant the bigquery.jobs.get
permission or create a custom role, follow these steps:
bigquery.jobs.get
) or select "Create Role" to define a custom role.Example Custom Role (JSON)
{
"title": "Custom BigQuery Job Viewer",
"description": "Allows viewing details and results of all jobs in the project.",
"includedPermissions": [
"bigquery.jobs.get"
],
"stage": "GA"
}
Important Considerations
By default, BigQuery jobs and their results are private to the user who created them. Even with the BigQuery Admin
role, a user cannot directly access the results of another user's job unless explicitly granted permission.
There are a few ways to allow User B to access the results of User A's job:
Share the Job: User A can share the job itself with User B. This allows User B to view the job details, query, and results. To share the job:
Persist Results to a Table: The most common solution is for User A to save the job results into a permanent table. User B can then be granted permissions (e.g., BigQuery Data Viewer
or BigQuery Reader
) on that table to access the data.
Grant bigquery.jobs.get
Permission:
Use Authorized Views:
Implementing Permissions
To grant the bigquery.jobs.get
permission or create a custom role, follow these steps:
bigquery.jobs.get
) or select "Create Role" to define a custom role.Example Custom Role (JSON)
{
"title": "Custom BigQuery Job Viewer",
"description": "Allows viewing details and results of all jobs in the project.",
"includedPermissions": [
"bigquery.jobs.get"
],
"stage": "GA"
}
Important Considerations