- Three lists are paginated.
users.listaccepts 1 to 500 per page (default 100);groups.listandmembers.listaccept 1 to 200, which is also their default. PassnextPageTokenback aspageToken. 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.
userKeyandgroupKeyare emails, aliases or IDs. They travel in the URL path, so the plugin encodes them.users.undeletetakes the immutable user ID only, not an email address. A delete keeps the account recoverable this way, sousers.deleteis destructive but not irreversible.- A rename can take up to 10 minutes to reach every service. Changing
primaryEmailreturns 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) orquotaExceededis a throughput limit, and Google’s guidance for both is exponential backoff. A 403 withdailyLimitExceededorlimitExceeded, 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. showDeletedis a string, not a boolean. Google types it that way; the plugin keeps Google’s type sotruearrives as"true".- Updates are patch-style.
users.updateuses the PUT that Google documents as patch-semantics for users, so absent fields are preserved and a field sent asnullis cleared; anamewith onlygivenNamechanges only the first name. Groups and organizational units go through PATCH.members.updateuses PATCH for a role change and the PUT for a delivery preference change, because Google takesdelivery_settingsonly 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.insertis marked destructive. - Repeated fields are replaced, not merged. For a user’s
emails,phonesororganizations, 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.
- 37 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- OAuth 2.0 (Recommended)
Open hub.corsair.dev, navigate to your project, and enter the client ID and client secret from your Google Admin OAuth app.More: OAuth 2.0
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 accountWhat’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.