Authenticate to Vertex AI Workbench

Stay organized with collections Save and categorize content based on your preferences.

This document describes how to authenticate to Vertex AI Workbench programmatically.

For more information about Google Cloud authentication, see the authentication overview.

API access

Vertex AI Workbench supports programmatic access. How you authenticate to Vertex AI Workbench depends on how you access the API. You can access the API in the following ways:

Google Cloud CLI

When you use the gcloud CLI to access Vertex AI Workbench, you log in to the gcloud CLI with a Google 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 impersonate a service account, either by using the impersonate_service_account property or by using the --impersonate-service-account flag, which affects only the command for which you use it.

For more information about using the gcloud CLI with Vertex AI Workbench, see the gcloud CLI reference pages.


You can authenticate to Vertex AI Workbench from the command line by using Application Default Credentials. For more information, see Authenticate using REST.

If you want to use the API without using a client library, you can use Google's authentication library for your programming language. Alternatively, you can implement authentication in your code.

Access control in Vertex AI Workbench

When you grant roles to a principal, always grant roles with only the required permissions; granting broader roles, such as basic roles, violates the principle of least privilege.

For more information about the roles for Vertex AI Workbench, see Managed notebooks access control. For more information about Identity and Access Management (IAM) and authorization, see IAM overview.

What's next