Google Workspace Directory Provider Setup
Introduction
To integrate Google Workspace with BassemLabs, create a Google Cloud Service Account, enable required APIs, and configure domain-wide delegation so BassemLabs can securely create/delete user accounts and connect with Google Classroom.
Visual guide:
Step 1: Create a Google Cloud Project
- Go to https://console.cloud.google.com/
- Sign in with your Google Workspace account
- Select project -> New Project
- Name the project (for example: Integration for BassemLabs)
- Click Create
Step 2: Create a Service Account
- Open IAM & Admin -> Service Accounts
- Click Create Service Account
- Enter a name (for example:
integration-service-account) - Click Create and Continue
- Assign Service Account User role
- Click Done
Step 3: Create Service Account Key (JSON)
- Open the created service account
- Open Keys tab
- Click Add key -> Create new key
- Select JSON
- Click Create
- Save downloaded JSON securely
Step 4: Enable Required APIs
Enable:
- Admin SDK API
- Classroom API
- Google Calendar API (optional)
From APIs & Services -> Library, search and enable each API.
Step 5: Enable Domain-Wide Delegation
- Open IAM & Admin -> Service Accounts
- Open your service account
- In Details, open Advanced settings
- Ensure Domain-wide Delegation is enabled
- Copy the service account Unique ID
Step 6: Grant Access in Google Admin Console
- Go to https://admin.google.com
- Log in as Super Admin
- Open Security -> API Controls -> Domain-wide Delegation
- Click Add new
- Paste Client ID (Unique ID)
- Add scopes:
https://www.googleapis.com/auth/admin.directory.user,
https://www.googleapis.com/auth/classroom.courses,
https://www.googleapis.com/auth/classroom.rosters,
https://www.googleapis.com/auth/admin.directory.resource.calendar,
https://www.googleapis.com/auth/calendar,
https://www.googleapis.com/auth/classroom.coursework.me,
https://www.googleapis.com/auth/classroom.coursework.me.readonly,
https://www.googleapis.com/auth/classroom.courses.readonly,
https://www.googleapis.com/auth/classroom.coursework.students,
https://www.googleapis.com/auth/classroom.courseworkmaterials,
https://www.googleapis.com/auth/classroom.student-submissions.students.readonly
- Click Authorize
Step 7: Enter Credentials in BassemLabs
Provide in Organization Keys:
- Google Admin Email
- Service Account ID (for example:
[email protected]) - Service Account JSON key file
Done
Your Google Workspace domain is configured for BassemLabs integration.