Connect Google Workspace to NIM
Google Workspace guide
Set up the Google Cloud service account, authorize access in Google Admin, then add the credentials to NIM and test the connection.
Platform referencesDirect link to Platform references
For Google Workspace requirements outside NIM, review Google's domain-wide delegation guidance. Review the authorized client and scopes regularly, and limit delegated scopes to the Google Workspace data and operations your NIM implementation uses.
Google's OAuth consent setup describes the current Google Auth Platform screens. Its credential setup explains where to find the service account's numeric client ID.
What you needDirect link to What you need
To connect NIM to Google Workspace, create a Google Cloud project and service account, download its P12 key, authorize that service account through Google Workspace domain-wide delegation, and add the P12 certificate to NIM. You also need the Google Workspace customer ID and an administrator account with the required roles for the Directory (Tenant) ID.
Use a Google Workspace super administrator to authorize domain-wide delegation. The Google Cloud account also needs permission to enable APIs, create the service account, and create its key. If an organization policy blocks key creation, ask your Google Cloud administrator to review the approved authentication setup; see Google's service-account key guidance. This NIM procedure uses a P12 certificate.
Success looks like this: after saving the Google system in NIM, Test Connection returns a success message. You can then collect the system and confirm the tables needed by your process are available.
Follow the three stages below, switching between NIM Studio, Google Cloud, and Google Admin as directed. Select a screenshot to enlarge it; perform the illustrated actions in the relevant application.
Create the NIM system and Google Cloud service accountDirect link to Create the NIM system and Google Cloud service account
-
In NIM Studio, go to Systems > Overview.
-
Click Add.
-
Select Google for System Type.
-
Enter a System Name.
-
Click Save.
-
The new system is added to the Configured Systems pane.
-
In a new tab, open the Google Cloud console.
-
Create a new project named
NIMand switch to it. -
Open Cloud Shell and confirm its active project is the
NIMproject you selected. -
Run these commands in Cloud Shell to enable the Google APIs used by this setup:
gcloud services enable admin.googleapis.comgcloud services enable groupssettings.googleapis.comgcloud services enable licensing.googleapis.comgcloud services enable drive.googleapis.comgcloud services enable gmail.googleapis.comgcloud services enable classroom.googleapis.com -
Open Google Auth Platform > Branding. Depending on the console navigation, APIs & Services > OAuth consent screen opens this area.
-
If you see Google Auth Platform not configured yet, select Get Started. If it is already configured, review the existing Branding, Audience, and contact information, then continue with service-account creation below.
-
For a new configuration, complete the setup:
- App Information: enter
NIMfor App name, choose a User support email, and select Next. - Audience: select Internal, then Next.
- Contact Information: enter an email address for project notifications, then select Next.
- Finish: review the Google API Services User Data Policy. If you agree, select its agreement checkbox, then Continue and Create.
- App Information: enter
-
Open APIs & Services > Credentials.
-
Select Create Credentials > Service Account.
-
For Service account name, enter
NIM. Accept the generated Service account ID, select Create and Continue, and complete creation with Done. -
Open the service account by selecting its email address. Record its Email and numeric Unique ID from Details. You can also find the numeric Client ID under Show advanced settings > Domain-wide delegation. Keep the email address and numeric client ID distinct for the fields below.
-
Open Keys > Add Key > Create New Key. Select P12, then Create. Store the downloaded
.p12file securely and record its private-key password (notasecret), then select Close.
Authorize domain-wide delegationDirect link to Authorize domain-wide delegation
- Open the Google Admin console as a super administrator.
- Go to Security > Access and data control > API controls.
- Select Manage Domain-Wide Delegation.
- Select Add New.
- In Client ID, paste the service account's numeric client ID recorded in the previous stage.
- In OAuth Scopes (Comma-Delimited), enter the following connector scope list. Review the requested access with your Google Workspace administrator before authorizing it. Any changes to this list must match the scopes requested by your NIM connector:
https://www.googleapis.com/auth/admin.datatransfer,https://www.googleapis.com/auth/admin.datatransfer.readonly,https://www.googleapis.com/auth/admin.directory.device.chromeos,https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly,https://www.googleapis.com/auth/admin.directory.device.mobile,https://www.googleapis.com/auth/admin.directory.device.mobile.readonly,https://www.googleapis.com/auth/admin.directory.group,https://www.googleapis.com/auth/admin.directory.group.readonly,https://www.googleapis.com/auth/admin.directory.orgunit,https://www.googleapis.com/auth/admin.directory.orgunit.readonly,https://www.googleapis.com/auth/admin.directory.rolemanagement,https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly,https://www.googleapis.com/auth/admin.directory.user,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.user.security,https://www.googleapis.com/auth/admin.directory.userschema,https://www.googleapis.com/auth/apps.groups.settings,https://www.googleapis.com/auth/apps.licensing,https://www.googleapis.com/auth/classroom.courses,https://www.googleapis.com/auth/classroom.courses.readonly,https://www.googleapis.com/auth/classroom.guardianlinks.students,https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly,https://www.googleapis.com/auth/classroom.rosters,https://www.googleapis.com/auth/classroom.rosters.readonly,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/gmail.settings.basic,https://www.googleapis.com/auth/gmail.settings.sharing,https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/gmail.labels
- Select Authorize and confirm the client ID and scopes appear in the delegation list. Google notes that delegation changes can take up to 24 hours to propagate, though they usually apply sooner.
- Go to Account > Account Settings and copy the Google Workspace Customer ID.
Add the certificate and validate the connectionDirect link to Add the certificate and validate the connection
- Return to your NIM browser tab. Add a certificate using the
.p12certificate and its password (notasecret). Name the certificateGoogle. - In NIM, edit the Google system you created previously. See Edit or remove a system.
- Enter the connection values using the field reference below.
| NIM field | Value to enter | Where to find it |
|---|---|---|
| Application (Client) ID | Service account email address | Google Cloud service account Details > Email |
| Directory (Tenant) ID | Google Workspace administrator email address with the roles listed below | Your Google Workspace administrator account |
| Certificate | The Google certificate | P12 certificate added to NIM in this stage |
| Customer ID | Google Workspace customer ID | Google Admin: Account > Account Settings |
The numeric service account Client ID is authorized in Google Admin's Domain-Wide Delegation settings. In the NIM Application (Client) ID field, use the service account email address instead.
The account used for the Directory (Tenant) ID must have User Management Admin and Groups Admin (built-in roles), plus License Admin (a role you create) in your Google Workspace tenant.
- Select Save.
- Select Test Connection and confirm that a success message is returned.
After a successful test, collect the Google system and check that the tables required by your process are available before configuring changes.
Next stepsDirect link to Next steps
Return to the Google Workspace integration to choose a task such as license assignment or user offboarding.