Create an instance with third party credentials
This page describes how to create a Vertex AI Workbench instance withthird party credentials.
Overview
You can create and manage Vertex AI Workbench instances withthird party credentials provided by Workforce Identity Federation.Workforce Identity Federation uses your external identity provider (IdP)to grant a group of users access to Vertex AI Workbench instancesthrough a proxy.
Access to a Vertex AI Workbench instance is granted by assigning aworkforce pool principalto the Vertex AI Workbench instance's service account.
Before you begin
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
- Create a project: To create a project, you need the Project Creator role (
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission.Learn how to grant roles.
Verify that billing is enabled for your Google Cloud project.
Enable the Notebooks API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission.Learn how to grant roles.In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
- Create a project: To create a project, you need the Project Creator role (
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission.Learn how to grant roles.
Verify that billing is enabled for your Google Cloud project.
Enable the Notebooks API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission.Learn how to grant roles.- Configure your IdP with aworkforce identity pool.
Required role for creating an instance
To ensure that your workforce pool principal has the necessary permissions to create a Vertex AI Workbench instance, ask your administrator to grant your workforce pool principal theNotebooks Admin (roles/notebooks.admin) IAM role on the project. For more information about granting roles, seeManage access to projects, folders, and organizations.
Your administrator might also be able to give your workforce pool principal the required permissions throughcustom roles or otherpredefined roles.
Required roles for using third party credentials
Your workforce pool principal needs access to yourVertex AI Workbench instance's service account, with specific permissions.
To ensure that the workforce pool principal has the necessary permissions to use a Vertex AI Workbench instance with third party credentials, ask your administrator to grant the workforce pool principal the following IAM roles on the service account that you'll specify when you create your instance:
- Service Account Token Creator (
roles/iam.serviceAccountTokenCreator) - Service Account User (
roles/iam.serviceAccountUser)
For more information about granting roles, seeManage access to projects, folders, and organizations.
Your administrator might also be able to give the workforce pool principal the required permissions throughcustom roles or otherpredefined roles.
Create the instance using third party credentials
To ensure that your Vertex AI Workbench instance contains abyoid.googleusercontent.com domain, you must do one of the following:
Create the instance by using the Google CloudWorkforce Identity Federation console.
Use the
enable_third_party_identityflag when you create your instance.
You can create a Vertex AI Workbench using third party credentials by using theGoogle Cloud console or the gcloud CLI:
Console
Sign in to the Google Cloud console using a workforce pool provider.
In the Google Cloud console, go to theInstances page.
Click Create new.
In theNew instance dialog, clickAdvanced options.
In theCreate instance dialog, in theIAM and security section,do the following:
Make sureService account is selected.
ClearUse default Compute Engine service account, and then,in theService account email field, enter the service accountemail address that is associated with your workforce principal.
ClickCreate.
Vertex AI Workbench creates an instance and automatically starts it.When the instance is ready to use, Vertex AI Workbenchactivates anOpen JupyterLab link.
gcloud
Follow theIAM guidefor authenticating the gcloud CLI with a workforce identity pool.
Before using any of the command data below, make the following replacements:
INSTANCE_NAME: the name of your Vertex AI Workbench instance; must start with a letter followed by up to 62 lowercase letters, numbers, or hyphens (-), and cannot end with a hyphenPROJECT_ID: your project IDLOCATION: the zone where you want your instance to be locatedVM_IMAGE_PROJECT: the ID of the Google Cloud project that VM image belongs to, in the format:projects/IMAGE_PROJECT_IDVM_IMAGE_NAME: the full image name; to find the image name of a specific version, seeFind the specific versionMACHINE_TYPE: themachine type of your instance's VMMETADATA: custom metadata to apply to this instance; for example, to specify a post-startup-script, you can use thepost-startup-scriptmetadata tag, in the format:"--metadata=post-startup-script=gs://BUCKET_NAME/hello.sh"SERVICE_ACCOUNT_EMAIL: the service account email address that is associated with your workforce principal
Execute the following command:
Linux, macOS, or Cloud Shell
Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.gcloudworkbenchinstancescreateINSTANCE_NAME\--project=PROJECT_ID\--location=LOCATION\--vm-image-project=VM_IMAGE_PROJECT\--vm-image-name=VM_IMAGE_NAME\--machine-type=MACHINE_TYPE\--metadata=METADATA\--service-account-email=SERVICE_ACCOUNT_EMAIL\--enable-third-party-identity
Windows (PowerShell)
Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.gcloudworkbenchinstancescreateINSTANCE_NAME`--project=PROJECT_ID`--location=LOCATION`--vm-image-project=VM_IMAGE_PROJECT`--vm-image-name=VM_IMAGE_NAME`--machine-type=MACHINE_TYPE`--metadata=METADATA`--service-account-email=SERVICE_ACCOUNT_EMAIL`--enable-third-party-identity
Windows (cmd.exe)
Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.gcloudworkbenchinstancescreateINSTANCE_NAME^--project=PROJECT_ID^--location=LOCATION^--vm-image-project=VM_IMAGE_PROJECT^--vm-image-name=VM_IMAGE_NAME^--machine-type=MACHINE_TYPE^--metadata=METADATA^--service-account-email=SERVICE_ACCOUNT_EMAIL^--enable-third-party-identity
For more information about the command for creating aninstance from the command line, see thegcloud CLIdocumentation.
Vertex AI Workbench creates an instance and automatically starts it.When the instance is ready to use, Vertex AI Workbenchactivates anOpen JupyterLab link in the Google Cloud console.
Access Jupyterlab with third party credentials
Your new Vertex AI Workbench instance creates two separate proxy URLs with thefollowing domains:
byoid.googleusercontent.com: This domain can only be used by usersauthenticating with a workforce identity pool. Its value is stored in yourinstance's metadata fieldproxy-byoid-url. This metadata value activatesanOpen JupyterLab link in theGoogle CloudWorkforce Identity Federation console(console.cloud.google/).googleusercontent.com: This domain can only be used by usersauthenticating with the default Google's First Party Authentication.Its value is stored in your instance's metadata fieldproxy-url. Thismetadata value activates anOpen JupyterLab link in theGoogle Cloud console (console.cloud.google.com).
What's next
- To learn more about third party principals to use for provisioning notebooks,seeWorkforce Identity Federation.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.