Skip to content
Advertisement

google-cloud-resource-manage list projects 403 The caller does not have permission

I created a GCP service account and assigned the needed permissions for listing the projects inside the organization. When I’m using the gcloud cli, everything works:

JavaScript

But when I try the “same” with the Python Client for Google Cloud Resource Manager, I receive a 403 The caller does not have permission error message.

JavaScript

Does the Python Client for Google Cloud Resource Manager needs some other permission than the gcloud cli or do I miss something inside the Python code?

Advertisement

Answer

Seems I missed the parent parameter
The following snipped should list the projects of a specific folder or organization.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement