# Least privilege for BigQuery means Job User on the project and Data Viewer on the dataset

Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.

BigQuery separates the right to run jobs from the right to read data. Google's documentation, read 16 Nov 2026, describes BigQuery Job User at project level and Data Viewer at dataset, table or view level, and says BigQuery Admin is typically granted at the project and is not recommended on datasets.

## BigQuery splits running jobs from reading data, and roles attach at several levels

Google's documentation says BigQuery Job User (roles/bigquery.jobUser) provides permissions to run jobs, including queries, and can be granted only on Resource Manager resources: projects, folders and organizations. BigQuery Data Viewer (roles/bigquery.dataViewer) reads table data, and can be granted on a dataset, table, view or routine.

That split is the basis of least privilege here. A person who must query one dataset needs Job User on the billing project and Data Viewer on that dataset, not a project-wide data role.

Dataset-level grants map to the older dataset roles. Google notes Data Viewer maps to the READER basic role, so granting it on a dataset gives READER access to the dataset.

The identities that call this service (people, services, workloads, third parties) are covered in the [Google Cloud service identities guide](/guides/google-cloud-service-identities/) and the [workload identities guide](/guides/google-cloud-workload-identities/).

## Roles to avoid, with the documented reason

Broad BigQuery roles combine data, job and dataset management.

- BigQuery Admin (roles/bigquery.admin): Google's description is permissions to manage all resources in the project, all data in it, and cancel other users' jobs. Google says it is possible to grant at lower levels but not recommended, because other predefined roles grant full permissions over those resources and are less permissive.
- BigQuery User (roles/bigquery.user) at project level: it lets the holder run jobs, enumerate datasets, and create new datasets, becoming BigQuery Data Owner on any dataset it creates.
- BigQuery Data Owner (roles/bigquery.dataOwner) and Data Editor (roles/bigquery.dataEditor): both write data; give them to pipelines that load tables, not to analysts.
- Basic roles: Google's IAM overview says they are highly permissive and should be avoided in production unless there is no alternative.

## A minimal binding for an analyst who queries one dataset

Two bindings, in two places, give a person query access to a single dataset.

| Binding | Role | Resource | Documented effect |
| --- | --- | --- | --- |
| 1 | roles/bigquery.jobUser | The project that runs queries | Run jobs, including queries, in the project |
| 2 | roles/bigquery.dataViewer | The dataset | List tables; get (query), export and replicate table data; invoke routines |

## Dataset, table, column and row controls narrow access further

Google's access control documentation lists controls beyond roles: IAM conditions on access, authorized views, column-level access control with data policies, and row-level security with row-level access policies. Use authorized views to expose a subset of a table without granting access to the underlying table.

Roles granted at a table or view carry less than the same role granted at the dataset.

## Checking what is used

The IAM recommender compares each principal's roles with permissions used in the last 90 days and flags excess ones, according to Google's documentation. Run it against the project that hosts datasets and review roles such as BigQuery Admin and Data Editor first.

Then list the access entries on each dataset and ask which of the principals have queried it recently.

Google's IAM roles overview describes custom roles and predefined roles as the tools for matching a role to a task. For BigQuery, compare the permissions of a predefined role with the job: an analyst who only queries needs table reads and job creation, and does not need dataset creation or table deletion. Where no predefined role fits, a custom role can carry exactly the permissions the task uses.

## Related pages

- [Least privilege for Google Kubernetes Engine](/services/gcp-gke/)
- [Least privilege for Cloud Run](/services/gcp-cloud-run/)
- [Least privilege for Cloud Functions](/services/gcp-cloud-functions/)
- [All of them](/services/)

## Sources

- BigQuery IAM roles and permissions: https://cloud.google.com/bigquery/docs/access-control (read 16 Nov 2026)
- IAM roles overview: https://cloud.google.com/iam/docs/roles-overview (read 16 Nov 2026)
- IAM Conditions overview: https://cloud.google.com/iam/docs/conditions-overview (read 16 Nov 2026)
- Role recommendations overview: https://cloud.google.com/iam/docs/recommender-overview (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://leastprivilegeprinciple.com/services/gcp-bigquery/
