5

Google APIs Service Agent service account deleted by mistake in google console, how to recover it.

I successfully created other service account using cloud console, how to recover this one, Please guide

Image

Tester12
  • 911
  • 1
  • 11
  • 23

1 Answers1

6

Resolved using this in gcloud console:

gcloud projects add-iam-policy-binding <PROJECT_ID> \
  --member serviceAccount:<PROJECT_NUMBER>@cloudservices.gserviceaccount.com \
  --role roles/editor

<PROJECT_NUMBER>, a 12-digit number, may be obtained from the output of gcloud project list, or, in case your project list is really uncomfortably long, from the string <PROJECT_ID> with
gcloud projects describe <PROJECT_ID> --format='get(projectNumber)'.

Tester12
  • 911
  • 1
  • 11
  • 23
  • 1
    I'm wondering what functionality did you lose by removing permission from the API Agent? I routinely remove it from some project, when the Recommender suggests it. BTW, please mark the green checkmark on your own answer, it is both correct and useful! – kkm inactive - support strike Aug 04 '22 at 23:13
  • @kkm, without this, I wasn't able to launch a rabbitmq bitnami product from the GCP marketplace the API uses this service account – Emmanuel Murairi Jan 24 '23 at 13:29