Skip to main content
Owner or Compute Admin role on the target GCP project is required to complete this setup.

Create or select a Google Cloud project

To use Google Cloud Compute APIs with OAuth 2.0, you need a Google Cloud project.

1

Create or select a project

Sign in to your Google Cloud Console, then open the project picker at the top of the page.

  • New project: Click New project, fill in Project name, Organization and Parent resource, then click Create.
  • Existing project: Select it in the project picker.
Select a resource dialog listing the projects in the organization, with the New project button highlighted.

Enable the required APIs

Navigate to APIs & Services > Library, search for each API below, click on it, then click Enable. If it already shows Manage, the API is already enabled.

  • Compute Engine API
  • Cloud Run Admin API
  • Cloud Functions API
  • Artifact Registry API

Configure Google Auth Platform

Before creating OAuth credentials, ensure Google Auth Platform is configured.

1

Enter app information

In the Google Cloud Console, go to APIs & Services > OAuth consent screen to open the Google Auth Platform dashboard.

  • Click Get started. If the OAuth Overview page with usage metrics opens instead, open the Branding page from the sidebar.
  • App name: A name for your application
  • User support email: Select an email for user inquiries.
  • Click Next to continue.
Branding page of the Google Auth Platform with the App information section, highlighting the App name and User support email fields (email redacted).
2

Select audience

Choose the appropriate user type for your application.

  • Internal: Only users within your Google Workspace organization can authorize (no app verification required).
  • External: Any Google account can authorize (requires app verification for production use).
  • Click Next to continue.
Audience page of the Google Auth Platform with the User type section highlighted, showing the current type and the Make internal button.
3

Enter contact information

Provide email addresses for Google to notify you about any changes to your project. Click Next to continue.

4

Finish configuration

Review your settings.

  • Agree to the Google API Services User Data Policy.
  • Click Create.

Configure scopes

Scopes are added on the Data Access page of Google Auth Platform.

Data Access page of the Google Auth Platform with the Add or remove scopes button highlighted above the list of configured scopes.
1

Add the scopes

Enables actions: Create Artifact Repository, Create Cloud Function, Create Cloud Run Job, Create Cloud Run Service, Create Disk Snapshot, Delete Artifact Repository, Delete Cloud Function, Delete Cloud Run Service, Delete Disk, Delete Instance, Delete Instance Group, Delete Managed Instance Group, Delete Snapshot, Get Artifact Docker Image, Get Artifact Package, Get Artifact Repository, Get Cloud Function, Get Cloud Run Job, Get Cloud Run Job Execution, Get Cloud Run Revision, Get Cloud Run Service, Get Compute Region, Get Compute Zone, Get Disk, Get Image, Get Instance, Get Instance Group, Get Managed Instance Group, Get Snapshot, Get Zone Operation, Insert Disk, Insert Image, Insert Instance, Insert Instance Group, Insert Managed Instance Group, List Artifact Docker Images, List Artifact Packages, List Artifact Repositories, List Artifact Versions, List Cloud Functions, List Cloud Run Job Executions, List Cloud Run Jobs, List Cloud Run Revisions, List Cloud Run Services, List Compute Regions, List Compute Zones, List Disks, List Images, List Instance Group Instances, List Instance Groups, List Instances, List Instances (Aggregated), List Managed Instance Groups, List Snapshots, Patch Cloud Function, Patch Cloud Run Service, Reset Instance, Resize Managed Instance Group, Resume Instance, Run Cloud Run Job, Start Instance, Stop Instance, Suspend Instance, Test Auth

In Google Auth Platform, open Data Access.

  • Click Add or Remove Scopes.
  • Under Manually add scopes in the Update selected scopes side panel, paste each scope listed.
  • Click Add to table.
  • Click Update.
  • On the Data Access page, click Save.

Create OAuth 2.0 client credentials

Set up OAuth client credentials to authenticate with Google Cloud APIs.

Credentials page under APIs & Services with the + Create credentials button highlighted.
1

Create a new OAuth client

In the Google Cloud Console, go to APIs & Services > Credentials.

  • Click + Create Credentials.
  • Select OAuth client ID.
  • Select Web application as the application type.
  • Name: A name that identifies this integration
  • Under Authorized redirect URIs, click Add URI.
  • Enter the Callback URL from your Connector Profile.
  • Click Create.
Create OAuth client ID form with Application type set to Web application, a Name filled in, the StackOne callback URL under Authorized redirect URIs, and the Create button highlighted.
2

Copy the Client ID and Client Secret

A dialog shows your Client ID and Client Secret.

  • Copy the Client ID and Client Secret into your Connector Profile.

Google Cloud session control and token expiry

Google Workspace administrators can enforce a Google Cloud session control window of 1 to 24 hours that applies to Google Cloud OAuth scopes. While it is enforced, the refresh token for this connection stops working once the window elapses, and the connected account keeps failing until a user re-authenticates interactively.

  • Symptom — the connected account periodically fails with a refresh token expired error even though the credentials and the OAuth client are unchanged.
  • Cause — Google Cloud session control requires interactive re-authentication for Google Cloud scopes. Google scopes outside Google Cloud (for example Sheets, Drive or Directory) are not affected.
  • Fix — in the Google Admin console, go to Security > Access and data control > Google Cloud session control and select Session never expires, or add this OAuth app to the trusted (exempted) apps list. Without one of these, periodic re-linking of the account is expected.

Create the StackOne Connector Profile

1

Create a Connector Profile

Enable the connector and create a Connector Profile in your project. See Setup Connector Profile.
2

Link an Account

Once the Connector Profile is created, continue to link an account.