[Python] How to auth using user authentication in python ? because I need to list out all the...

Discussão em 'Python' iniciado por Stack, Agosto 20, 2025.

  1. Stack

    Stack Membro Participativo

    I need the list of project ids in gcp using python

    I am trying this

    from google.cloud.resourcemanager import ProjectsClient
    for project in ProjectsClient().list_projects():
    print(project.display_name)


    but I am getting the following error


    google.api_core.exceptions.PermissionDenied: 403 The caller does not have permission
    ​

    I think this could be resolved if I use a user account authentication instead of service account authentication.

    Please suggest me a method to achieve this

    Continue reading...

Compartilhe esta Página