Authenticate to Access Approval
Stay organized with collections
Save and categorize content based on your preferences.
This document describes how to authenticate to Access Approval programmatically. How
you authenticate to Access Approval depends on the interface you use to access the API
and the environment where your code is running.
For more information about Google Cloud authentication, see the
Authentication methods.
API access
Access Approval supports programmatic access. You can access the API in
the following ways:
Google Cloud CLI
When you use the gcloud CLI to access
Access Approval, you
log in to the gcloud CLI with a user
account, which provides the credentials used by the gcloud CLI commands.
If your organization's security policies prevent user accounts from having the required
permissions, you can use service account impersonation.
For more information, see
Authenticate for using the gcloud CLI.
For more information about using the gcloud CLI with Access Approval,
see the gcloud CLI reference pages.
REST
You can authenticate to
the Access Approval API
by using your gcloud CLI credentials or by using
Application Default Credentials.
For more information about authentication for REST requests, see
Authenticate for using REST.
For information about the types of credentials, see
gcloud CLI credentials and ADC credentials.
Access control for Access Approval
After you authenticate to Access Approval, you must be authorized to access
Google Cloud resources. Access Approval uses
Identity and Access Management (IAM) for authorization.
For more information about the roles for Access Approval, see
Access control with IAM.
For more information about IAM and authorization, see
IAM overview.
What's next
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eAccess Approval can be accessed programmatically through the Google Cloud CLI or REST.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication to Access Approval depends on the interface used (gcloud CLI or REST) and the environment in which the code is running.\u003c/p\u003e\n"],["\u003cp\u003eThe gcloud CLI uses user account credentials by default, but supports service account impersonation for stricter security requirements.\u003c/p\u003e\n"],["\u003cp\u003eREST API access can use either gcloud CLI credentials or Application Default Credentials for authentication.\u003c/p\u003e\n"],["\u003cp\u003eAfter authenticating, users must be authorized to access Google Cloud resources via Identity and Access Management (IAM).\u003c/p\u003e\n"]]],[],null,["# Authenticate to Access Approval\n\nThis document describes how to authenticate to Access Approval programmatically. How\nyou authenticate to Access Approval depends on the interface you use to access the API\nand the environment where your code is running.\n\n\nFor more information about Google Cloud authentication, see the\n[Authentication methods](/docs/authentication).\n\nAPI access\n----------\n\n\nAccess Approval supports programmatic access. You can access the API in\nthe following ways:\n\n- [Google Cloud CLI](#gcloud)\n- [REST](#rest)\n\n### Google Cloud CLI\n\n\nWhen you use the [gcloud CLI](/sdk/gcloud/reference/access-approval) to access\nAccess Approval, you\n[log in to the gcloud CLI](/sdk/docs/authorizing) with a user\naccount, which provides the credentials used by the gcloud CLI commands.\n\n\nIf your organization's security policies prevent user accounts from having the required\npermissions, you can use [service account impersonation](#sa-impersonation).\n\nFor more information, see\n[Authenticate for using the gcloud CLI](/docs/authentication/gcloud).\nFor more information about using the gcloud CLI with Access Approval,\nsee [the gcloud CLI reference pages](/sdk/gcloud/reference/access-approval).\n\n\n### REST\n\n\nYou can authenticate to\n[the Access Approval API](/assured-workloads/access-approval/docs/reference/rest)\nby using your gcloud CLI credentials or by using\n[Application Default Credentials](/docs/authentication/application-default-credentials).\nFor more information about authentication for REST requests, see\n[Authenticate for using REST](/docs/authentication/rest).\nFor information about the types of credentials, see\n[gcloud CLI credentials and ADC credentials](/docs/authentication/gcloud#gcloud-credentials).\n\nAccess control for Access Approval\n----------------------------------\n\n\nAfter you authenticate to Access Approval, you must be authorized to access\nGoogle Cloud resources. Access Approval uses\nIdentity and Access Management (IAM) for authorization.\n\n\nFor more information about the roles for Access Approval, see\n[Access control with IAM](/assured-workloads/access-approval/docs/access-control).\nFor more information about IAM and authorization, see\n[IAM overview](/iam/docs/overview).\n\nWhat's next\n-----------\n\n- Learn about [Google Cloud authentication methods](/docs/authentication#auth-decision-tree).\n- See a list of [authentication use cases](/docs/authentication/use-cases)."]]