Skip to main content
Use Google Admin through Corsair: one client, typed API calls. The Directory API administers a Google Workspace account: users, their aliases and photos, groups and memberships, organizational units, domains and the customer record. Calls must be made as a signed-in administrator. A service account needs domain-wide delegation to impersonate one, and the OAuth client needs its scope granted in the Admin console. Things to know before you call:
  • Three lists are paginated. users.list accepts 1 to 500 per page (default 100); groups.list and members.list accept 1 to 200, which is also their default. Pass nextPageToken back as pageToken. The other lists (domains.list, domains.aliases.list, orgUnits.list, and the user and group alias lists) return everything in one response and take no page token.
  • A page token expires after three days on the user list. Re-run the first page rather than retrying an expired token.
  • userKey and groupKey are emails, aliases or IDs. They travel in the URL path, so the plugin encodes them.
  • users.undelete takes the immutable user ID only, not an email address. A delete keeps the account recoverable this way, so users.delete is destructive but not irreversible.
  • A rename can take up to 10 minutes to reach every service. Changing primaryEmail returns success long before every Google product sees the new address.
  • A user that was just created can refuse a follow-up call with a 409 until Google’s backends finish propagating. The docs name this as “User creation is not complete”; retrying that call later is the documented fix.
  • Rate limits arrive in two shapes. A 429 is the per-account concurrency limit and cannot be raised. A 403 with reason userRateLimitExceeded (2,400 queries per minute per user per project by default) or quotaExceeded is a throughput limit, and Google’s guidance for both is exponential backoff. A 403 with dailyLimitExceeded or limitExceeded, or a 403 or 429 whose message names a per-day quota, is an exhausted day quota, which no retry can refill. The plugin retries the first group and reports the second.
  • showDeleted is a string, not a boolean. Google types it that way; the plugin keeps Google’s type so true arrives as "true".
  • Updates are patch-style. users.update uses the PUT that Google documents as patch-semantics for users, so absent fields are preserved and a field sent as null is cleared; a name with only givenName changes only the first name. Groups and organizational units go through PATCH. members.update uses PATCH for a role change and the PUT for a delivery preference change, because Google takes delivery_settings only on insert, update and get.
  • Creating a user can cost money. On a flexible Google Workspace plan every new user is a billed licence, so users.insert is marked destructive.
  • Repeated fields are replaced, not merged. For a user’s emails, phones or organizations, send every item with the value it should end up with. Sending one email address leaves exactly that one.
  • No inbound webhooks. The Directory API pushes changes to a callback URL a tenant hosts, so this plugin registers no webhook route.
What you get:
  • 37 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List the first 50 users in the account
Add a user to a group as a plain member, which is the API default role
See the full list on the API page.

What’s next

API reference

Every googleadmin.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.