Set up a Google Workspace v2 connector
This is an updated and improved version of the Google Workspace integration! If you’re setting up a Google Workspace integration with ConductorOne for the first time, you’re in the right place.
Capabilities
Resource | Sync | Provision |
---|---|---|
Accounts | ✅ | |
Groups | ✅ | ✅ |
Roles | ✅ | ✅ |
Available hosting methods
Choose the hosting method that best suits your needs:
Method | Availability | Notes |
---|---|---|
Cloud hosted | ✅ | A built-in, no-code connector hosted by ConductorOne. |
Self-hosted | ✅ | The Google Workspace connector, hosted and run in your own environment. |
Gather Google Workspace credentials
Each setup method requires you to pass in credentials generated in Google Workspace. Gather these credentials before you move on.
A user with the Super Admin role in Google Workspace must perform this task.
Create a new project
As a Google Workspace Super Admin, sign in to https://console.cloud.google.com.
In the toolbar, click the project select dropdown, and click NEW PROJECT.
Create a new project for your organization:
- Project Name: Choose a names, such as “ConductorOne Integration”
- Organization/Location: Choose the appropriate Organization/Location
After the project is created, make sure the correct project is selected in the dropdown at the top.
Enable the API
In the navigation menu, navigate to > APIs & Services > Library.
Search for and select the Admin SDK API.
Click Enable.
Create a service account
In the navigation menu, navigate to > APIs & Services > Credentials.
Select CREATE CREDENTIALS > Service Account.
Under Service account details, fill in the following:
- Service account name: ConductorOne Integration
- Service account description: for example, “Service account for ConductorOne Google Workspace Integration”
- Click CREATE AND CONTINUE
Under Grant this service account access to a project, grant the Editor role.
Leave Grant users access to this service account blank.
Click DONE.
Get credentials
- Navigate back to APIs & Services > Credentials and select the service account you just created.
- Click the service account’s email address. Locate and save the Unique ID. We’ll use this in Step 5.
- On the Service Account Details Page, click KEYS.
- Click ADD KEY > Create new key.
- Choose JSON and click CREATE.
- Keep the downloaded file somewhere safe.
Add Service Account to Google Workspace
Go to https://admin.google.com as a SUPER ADMIN.
In the navigation menu, select Security > Access and data control > API Controls.
Click MANAGE DOMAIN WIDE DELEGATION.
Click Add new and fill out the form:
Client ID: The saved ID from Step 4
OAuth Scopes: Copy and paste in the relevant scopes
Use the following scopes if you are NOT using the Google Workspace integration for provisioning:
https://www.googleapis.com/auth/admin.directory.user.alias.readonly,https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly,https://www.googleapis.com/auth/admin.directory.group.member.readonly,https://www.googleapis.com/auth/admin.directory.group.readonly,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.domain.readonly,https://www.googleapis.com/auth/admin.reports.audit.readonly
Use the following scopes if you are using the Google Workspace integration for provisioning Groups and Roles:
https://www.googleapis.com/auth/admin.directory.user.alias.readonly,https://www.googleapis.com/auth/admin.directory.rolemanagement,https://www.googleapis.com/auth/admin.directory.group.member,https://www.googleapis.com/auth/admin.directory.group,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.domain.readonly,https://www.googleapis.com/auth/admin.reports.audit.readonly
Click AUTHORIZE.
In the navigation menu, select Account > Account Settings.
Copy the Customer ID from this page.
Locate your Primary Domain
In the navigation panel on the left, click Account > Domains.
Click Manage Domains. Locate and copy the domain labeled as the Primary Domain in the Type column.
That’s it! Next, move on to the instructions for your chosen setup method.
Set up a Google Workspace cloud-hosted connector
This task requires either the Connector Administrator or Super Administrator role in ConductorOne.
In ConductorOne, click Connectors > Add connector.
Search for Google Workspace v2 and click Add.
Choose how to set up the new Google Workspace connector:
Add the connector to a currently unmanaged app (select from the list of apps that were discovered in your identity, SSO, or federation provider that aren’t yet managed with ConductorOne)
Add the connector to a managed app (select from the list of existing managed apps)
Create a new managed app
Set the owner for this connector. You can manage the connector yourself, or choose someone else from the list of ConductorOne users. Setting multiple owners is allowed.
A Google Workspace connector owner must have:
- Connector Administrator or Super Administrator role in ConductorOne
- Access to the set of credentials generated by following the Generate Google Workspace credentials instructions
Click Next.
If you are the connector owner, go on to the next step.
If someone else is the connector owner, you can stop here. ConductorOne will notify the connector owner by email that their help is needed to complete the setup process.
Find the Settings area of the page and click Edit.
In the Customer ID field, enter the customer ID.
Optional. If you want to limit which domains ConductorOne syncs, in the Domain field, enter the primary domain from Step 6. If you leave this field blank, ConductorOne will sync all available domains.
In the Administrator email field, enter the email address associated with your domain or a super admin.
In the Credentials (JSON) area, click Choose file and upload the file.
Click Save.
The connector’s label changes to Syncing, followed by Connected. You can view the logs to ensure that information is syncing.
That’s it! Your Google Workspace connector is now pulling access data into ConductorOne.
Set up a Google Workspace cloud-hosted connector using Terraform
You can use Terraform to configure the integration between Google Workspace and ConductorOne.
See the ConductorOne Google Workspace integration resource page in the ConductorOne Terraform registry for example usage and the full list of required and optional parameters.
Set up a Google Workspace self-hosted connector
To complete this task, you’ll need:
- The Connector Administrator or Super Administrator role in ConductorOne
- Access to the set of credentials generated by following the Generate Google Workspace credentials instructions
When running in service mode on Kubernetes, a self-hosted connector maintains an ongoing connection with ConductorOne, automatically syncing and uploading data at regular intervals. This data is immediately available in the ConductorOne UI for access reviews and access requests.
Why use Kubernetes? Kubernetes provides automated deployment, scaling, and management of your connectors. It ensures high availability and reliable operation of your connector services.
Step 1: Configure the Google Workspace connector
In ConductorOne, navigate to Connectors > Add connector
Search for Baton and click Add
Choose whether to add to an existing application or create new
Set the connector owner(s)
Click Create and add details
In the Settings area, click Edit
Click Rotate to generate a new Client ID and Secret
Save these credentials securely - you’ll need them for the Kubernetes configuration
Step 2: Create Kubernetes configuration files
Create two Kubernetes manifest files for your Google Workspace connector deployment:
Secrets configuration
# baton-google-workspace-secrets.yaml
apiVersion: v1
kind: Secret
metadata:
name: baton-google-workspace-secrets
type: Opaque
data:
# ConductorOne credentials
BATON_CLIENT_ID: <base64 encoded ConductorOne client ID>
BATON_CLIENT_SECRET: <base64 encoded ConductorOne client secret>
# Google Workspace specific credentials
BATON_CUSTOMER_ID: <base64 encoded customer ID>
BATON_DOMAIN: <base64 encoded domain>
BATON_ADMINISTRATOR_EMAIL: <base64 encoded administrator email>
BATON_CREDENTIALS_JSON: <base64 encoded credentials JSON>
# Optional: include if you want ConductorOne to provision access using this connector
BATON_PROVISIONING: true
Base64 Encoding: Use
echo -n "your-value" | base64
to encode your secrets
See the connector’s README or run
--help
to see all available configuration flags and environment variables.
Deployment configuration
# baton-google-workspace.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: baton-google-workspace
labels:
app: baton-google-workspace
spec:
selector:
matchLabels:
app: baton-google-workspace
template:
metadata:
labels:
app: baton-google-workspace
baton: true
baton-app: google-workspace
spec:
containers:
- name: baton-google-workspace
image: ghcr.io/conductorone/baton-google-workspace:latest
args: ["service"]
imagePullPolicy: IfNotPresent
envFrom:
- secretRef:
name: baton-google-workspace-secrets
Step 3: Deploy the connector
Create a namespace in which to run ConductorOne connectors (if desired):
kubectl create namespace baton-google-workspace
Apply the secret configuration:
kubectl -n baton-google-workspace apply -f baton-google-workspace-secrets.yaml
Apply the deployment:
kubectl -n baton-google-workspace apply -f baton-google-workspace.yaml
Step 4: Verify the deployment
Check that the deployment is running:
kubectl -n c1 get pods
View the connector logs:
kubectl -n c1 logs -l app=baton-${baton-google-workspace}
In ConductorOne, navigate to Applications > Managed apps > Google Workspace v2
- Verify that resources and accounts are being synced correctly
- Check the connector status in the settings page
What’s next?
If Google Workspace is your company’s identity provider (meaning that it is used to SSO into other software), the integration sync will automatically create applications in ConductorOne for all of your SCIMed software. Before you move on, review the Create applications page for important information about how to set up integrations with the SCIMed apps.