> For the complete documentation index, see [llms.txt](https://www.techwithtyler.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.techwithtyler.dev/cloud-security/gcp/gcp-offensive-security/gcp-privilege-escalation/iam.md).

# IAM

## iam.serviceAccounts.getAccessToken

* With access to these permissions, an attacker can impersonate a target Service Account, escalating their privileges.

{% code overflow="wrap" %}

```bash
gcloud config set auth/impersonate_service_account <service-acct-name>@<gcp-project-id>.iam.gserviceaccount.com 
```

{% endcode %}

***
