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 four 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. The scope configurator defaults to all operations; use the API scope reference to review access for each table.
Create the NIM system and Google Cloud service accountDirect link to Create the NIM system and Google Cloud service account
Create the system in NIM StudioDirect link to Create the system in NIM Studio
- 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.
Checkpoint: the Google system is saved in NIM. Keep that browser tab open for the connection details later.
Prepare the Google Cloud project and APIsDirect link to Prepare the Google Cloud project and APIs
-
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
Checkpoint: the NIM project is selected and the API enablement commands have completed successfully. Resolve any errors before creating credentials.
Create the service account and credentialsDirect link to Create the service account and credentials
- 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.
Checkpoint: you have the service account email, numeric client ID, downloaded P12 file, and its password. Continue to Open Google delegation using the numeric client ID.
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.
Select API scopes and authorize accessDirect link to Select API scopes and authorize access
- In OAuth Scopes (Comma-Delimited), paste the list produced by the configurator below. All tables and operations are selected by default. To reduce access, retain only the operations your process needs, including reads used for collection, matching, filters, or reporting. Review the result with your Google Workspace administrator before authorizing it.
Customize scopes
All tables and operations are selected by default. Keep the operations your NIM implementation uses. The output combines their exact scopes without duplicates.
118 of 118 operations selected · 28 scopes including connection-test access
https://www.googleapis.com/auth/admin.directory.userThe connector requests this full user scope for Test Connection. Selecting read operations does not make the complete authorization read-only.41 of 41 tables shown. Search does not change your selection.
chromeosdevices3/3 selected
classroom_course_aliases3/3 selected
classroom_course_students3/3 selected
classroom_course_teachers3/3 selected
classroom_courses4/4 selected
classroom_invitations3/3 selected
classroom_userProfiles_guardianInvitations2/2 selected
classroom_userProfiles_guardians2/2 selected
datatransfer_applications1/1 selected
datatransfer_transfers4/4 selected
drive_drives3/3 selected
groups4/4 selected
groups_aliases3/3 selected
groups_settings2/2 selected
license_assignments3/3 selected
licenses1/1 selected
managers3/3 selected
members4/4 selected
mobiledevices2/2 selected
orgunits4/4 selected
owners3/3 selected
privileges1/1 selected
roleAssignments3/3 selected
roles1/1 selected
users11/11 selected
users_aliases3/3 selected
users_asps2/2 selected
users_gmail_labels4/4 selected
users_gmail_profiles1/1 selected
users_gmail_settings_autoforwarding2/2 selected
users_gmail_settings_delegates3/3 selected
users_gmail_settings_filters3/3 selected
users_gmail_settings_forwardingAddresses3/3 selected
users_gmail_settings_imap2/2 selected
users_gmail_settings_language2/2 selected
users_gmail_settings_pop2/2 selected
users_gmail_settings_sendas4/4 selected
users_gmail_settings_vacation2/2 selected
users_photos4/4 selected
users_tokens2/2 selected
users_verificationCodes3/3 selected
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.user,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.user.security,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.labels,https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/gmail.settings.basic,https://www.googleapis.com/auth/gmail.settings.sharing
- 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.
See Google Workspace API scopes for the scope requirements by table and operation.
Next stepsDirect link to Next steps
Return to the Google Workspace integration to choose a task such as license assignment or user offboarding.