Configure Connection
Google Workspace guide
Follow this focused guide to configure and validate Google Workspace in NIM.
- 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, go to the Google Cloud Platform console at https://console.cloud.google.com/.
- Create a new project named
NIMand switch to it. - Open Cloud Shell
- Run the following commands - gcloud services enable admin.googleapis.com - gcloud services enable groupssettings.googleapis.com - gcloud services enable licensing.googleapis.com - gcloud services enable drive.googleapis.com - gcloud services enable gmail.googleapis.com - gcloud services enable classroom.googleapis.com
- Expand the menu and go to APIs & Services > OAuth Consent Screen.
- Select the Internal user type and click Create. Enter
NIMfor the App Name. Enter a relevant User Support Email and Developer Email Address. Click Save And Continue. - On the Scopes page, click Save And Continue.
- On the Summary page, click Back To Dashboard.
- Expand the menu and go to APIs & Services > Credentials.
- Click Create Credentials > Service Account.
- For the Service Account Name, enter
NIM. Accept the default generated Service Account ID value. Click Create and Continue. Click Done. - Click the pencil icon to edit the newly created NIM service account. On the Details tab, Copy the Email and Unique ID to a local text editor application.
- Go to the Keys tab. Click Add Key > Create New Key. Select P12. Click Create. The .p12 file is downloaded. Copy the Private Key Password (
notasecret) to a local text editor application. Click Close. - Go to the Google Admin Console at https://admin.google.com/.
- Go to Security > Access > API Controls.
- Click Manage Domain-Wide Delegation.
- Click Add New.
- Paste the Unique ID you copied earlier into the Client ID field.
- In the OAuth Scopes (Comma-Delimited) field:
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
- Click Authorize. The new OAuth application is added with the scopes.
- Go to Account > Account Settings > Copy Customer ID
- Return to your NIM browser tab. Add a certificate using the .p12 certificate you downloaded earlier, and the password you copied (
notasecret). Name the certificateGoogle. - In NIM, edit the Google system you created previously. See Edit a system.
- For the Application (Client) ID, paste the service account Email you copied previously. For the Directory (Tenant) ID, enter the email address you use to log in to Google Cloud Platform. For the Certificate, select the Google certificate you just added. For Customer ID, paste the Customer ID you copied previously. :::info The account used for the Directory (Tenant) ID must possess, at a minimum, the following roles/permissions within your Google Workspace tenant: - User Management Admin (Built-In) - Groups Admin (Built-In) - License Admin (You must create this) :::
- Click Save.
- Click Test Connection. A success message is returned.