Skip to main content
selectGooglelast verified 2026-07-31
Servicescloudresourcemanager
CredentialsGOOGLE_CREDENTIALS
Permissionsresourcemanager.projects.list

GCP projects under an org or folder

Lists the GCP projects directly under one parent container - an organization or a folder. Project enumeration is the entry point for any org-wide GCP audit: the projectId values returned here are the fan-out dimension for every per-project query.

Query

SELECT projectId, displayName, state, parent, createTime, labels
FROM google.cloudresourcemanager.projects
WHERE parent = '{{parent}}';

Variation: one project by id

Supplying projectsId reads a single project. Its name field carries the resource path projects/, which is the numeric identifier some APIs require in place of the project id:

SELECT projectId, displayName, state, parent, name, labels
FROM google.cloudresourcemanager.projects
WHERE projectsId = 'my-project';

Notes

This is the v3 Resource Manager API, where the state column is called state and carries ACTIVE or DELETE_REQUESTED - the v1 name lifecycleState no longer exists and selecting it fails with a no such column error. parent is mandatory for the listing form: omitting it fails with HTTP 400 and 'field [parent] has issue [invalid parent name]' rather than listing everything the credential can see. The listing is not recursive - it returns only the projects immediately under the container, so descend a hierarchy by recursing through google.cloudresourcemanager.folders with the same parent form. Filter to state = 'ACTIVE' before fanning out, since DELETE_REQUESTED projects still appear but reject most API calls.

Related queries

  • GCS buckets in a project - Lists Cloud Storage buckets in one project with location, storage class and creation time; the per-project storage inventory.
  • GCP service accounts in a project - Lists IAM service accounts in one project with email, display name and unique id; the workload principal inventory for a privilege audit.
  • GCE instances in a project - Lists Compute Engine instances across every zone in a project in one call, with status, machine type and placement.