Is it possible to restore a deleted service account on Gcloud?

0 votes
Can I restore a deleted service account on GCP. If yes, how can I do this?
Oct 30 in GCP by Sam
• 4,280 points
34 views

1 answer to this question.

0 votes

It's sometimes possible to restore a deleted service account using the undelete command.

To undelete a service account, the caller must be granted the iam.serviceAccounts.undelete permission on the deleted service account. This permission is included in the Owner (roles/owner) primitive role.

The deleted service account's unique ID must be provided when using the undelete command.

Use the serviceAccounts.undelete() 

POST https://iam.googleapis.com/v1/projects/[PROJECT-ID]/serviceAccounts/[ACCOUNT-UNIQUE-ID]:undelete

You would get 200 response code with details about the restored service account, on successful recovery of the account. 

POST https://iam.googleapis.com/v1/projects/[PROJECT-ID]/serviceAccounts/[ACCOUNT-UNIQUE-ID]:undelete
answered Oct 30 by Sirajul
• 38,740 points
Unable to restore deleted service account on GCP.

Related Questions In GCP

0 votes
1 answer

Is it possible to rename a project in GCP?

Yes, it is possible to rename your ...READ MORE

answered Sep 27 in GCP by Sirajul
• 38,740 points
31 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer