Skip to main content

Google Workspace

Overview

Gain visibility into Google Workspace users, groups, organizational structure, and admin roles to enhance identity governance, improve security posture, and ensure compliance. Monitor user access patterns, organizational hierarchies, and administrative permissions to maintain secure and compliant identity management across your Google Workspace environment.

Configurations

ConfigurationDescription
Blueprint Account NameA human-readable name for your account that will be used to identify this account across the application.
Service Account JSONGoogle Service Account credentials in JSON format with domain-wide delegation enabled
Admin EmailEmail address of a Google Workspace admin user to impersonate for API calls
Customer IDGoogle Workspace customer ID (optional, defaults to 'my_customer' for the primary domain)
Data Crawl FrequencyThe frequency at which Kscope will crawl your Google Workspace account for data.

Permissions

The Google Workspace blueprint requires a Service Account with domain-wide delegation enabled. Follow these steps to create and configure the service account:

Step 1: Create a Service Account

  1. Go to the Google Cloud Console
  2. Select your project or create a new one
  3. Navigate to IAM & Admin > Service Accounts
  4. Click Create Service Account
  5. Enter a name and description for the service account
  6. Click Create and Continue
  7. Skip the optional steps and click Done
  8. Click on the newly created service account
  9. Go to the Keys tab
  10. Click Add Key > Create new key
  11. Select JSON format and click Create
  12. Save the downloaded JSON file securely (this is your serviceAccountJSON credential)

Step 2: Enable Domain-Wide Delegation

  1. In the service account details, copy the Client ID (a numeric string)
  2. Go to your Google Workspace Admin Console
  3. Navigate to Security > Access and data control > API Controls
  4. Click Manage Domain Wide Delegation
  5. Click Add new
  6. Paste the Client ID from step 1
  7. Add the following OAuth scopes (comma-separated):
https://www.googleapis.com/auth/admin.directory.user.readonly,
https://www.googleapis.com/auth/admin.directory.group.readonly,
https://www.googleapis.com/auth/admin.directory.orgunit.readonly,
https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly
  1. Click Authorize

Step 3: Enable Required APIs

  1. In the Google Cloud Console, navigate to APIs & Services > Library
  2. Search for and enable the following APIs:
    • Admin SDK API

Required OAuth Scopes:

ScopeDescriptionWhy it's needed
admin.directory.user.readonlyRead user informationAccess user profiles, authentication settings, and user lifecycle data
admin.directory.group.readonlyRead group informationRead group configurations, memberships, and group-based access policies
admin.directory.orgunit.readonlyRead organizational unit informationAccess organizational structure and hierarchy data
admin.directory.rolemanagement.readonlyRead admin role informationAccess admin roles, privileges, and role assignments

Important Notes:

  • The service account must have domain-wide delegation enabled
  • You must specify an admin email address to impersonate for API calls
  • The admin user being impersonated must have sufficient privileges to access all resources
  • Store the service account JSON credentials securely and never commit them to source control

For more details on Google Workspace Admin SDK, refer to the following documentation:

Schema Model

ResourcesSource EntityNormalized EntityDescription
Google WorkspacegoogleworkspaceInstanceThe Google Workspace instance.
Workspacegoogleworkspace.workspaceWorkspaceThe Google Workspace domain.
Usersgoogleworkspace.user.UserUserA Google Workspace user.
User External IDsgoogleworkspace.user.ExternalIDExternalIDExternal identifiers for a user.
User Phonesgoogleworkspace.user.PhonePhonePhone numbers for a user.
User Locationsgoogleworkspace.user.LocationLocationPhysical locations for a user.
User Organizationsgoogleworkspace.user.OrganizationOrganizationOrganization details for a user.
Groupsgoogleworkspace.group.GroupGroupA Google Workspace group.
Group Membersgoogleworkspace.group.MemberMemberMembers of a group.
Organizational Unitsgoogleworkspace.orgunit.OrgUnitOrgUnitAn organizational unit.
Admin Rolesgoogleworkspace.role.RoleRoleAn administrative role.
Role Privilegesgoogleworkspace.role.RolePrivilegePrivilegePrivileges assigned to a role.
Role Assignmentsgoogleworkspace.roleassignment.RoleAssignmentRoleAssignmentRole assignments to users/groups.

Resources Crawled

The Google Workspace crawler collects the following information:

Users

  • Basic profile information (name, email, user ID)
  • Admin and delegated admin status
  • Last login time and creation time
  • Suspended status and suspension reason
  • Organizational unit membership
  • 2-step verification status (enrolled and enforced)
  • Email aliases
  • External IDs (e.g., employee ID)
  • Phone numbers
  • Physical locations (building, floor, area)
  • Organization information (title, department, cost center)

Groups

  • Group email and name
  • Group description
  • Member count
  • Admin-created status
  • Email aliases
  • Group members with roles (OWNER, MANAGER, MEMBER)
  • Member types (USER, GROUP, CUSTOMER)
  • Member status

Organizational Units

  • Organizational unit path and ID
  • Name and description
  • Parent organizational unit relationships
  • Inheritance settings

Admin Roles

  • Role name and description
  • System role indicator
  • Super admin role indicator
  • Role privileges with service associations

Role Assignments

  • Assigned user or group
  • Assignee type (USER or GROUP)
  • Scope type (CUSTOMER or ORG_UNIT)
  • Organizational unit scope (if applicable)

Use Cases

Identity Governance

  • Monitor user lifecycle and access patterns
  • Track organizational structure and reporting hierarchies
  • Identify dormant or inactive accounts
  • Audit admin role assignments and privileges

Security Posture

  • Verify 2-step verification enforcement
  • Monitor admin user activities
  • Track privileged role assignments
  • Identify users with elevated permissions

Compliance

  • Document organizational structure
  • Audit user access and permissions
  • Track role-based access control
  • Maintain compliance with identity governance policies

Cross-Platform Integration

  • Connect Google Workspace users to cloud resources (AWS, GCP, Azure)
  • Link Google Workspace groups to application access (GitHub, Jira, etc.)
  • Correlate user identities across multiple platforms
  • Analyze access patterns across integrated services