> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Workspace Directory users

> Mount Google Workspace Directory users.

Follow the [REST app guide](https://docs.bijection.com/integrations/native-rest.md#mount-and-bind).
Use `providerEndpoint` from `@bijectionhq/app-rest` to bind the collection,
and supply Google OAuth `admin.directory.user.readonly` with directory read privileges.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
const provider = providerEndpoint(
  "google-directory/users.observations",
  "https://admin.googleapis.com",
  "/admin/directory/v1/users",
  auth,
  data,
);
```

Pass `provider` as `receivers.provider`, with the same label to the binder and as the app's `data`. Grant the app's `operator` role, then call
`source.initialize` with this profile.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{ profile: { mode: "provider", provider: "google-directory/users.observations", limit: 25 } }
```

List the authenticated administrator's customer by default. Set `selection` to an explicit customer ID to pin another customer visible to the administrator. Directory user ID keys observations. Suspended and archived flags are retained when returned. Deleted or missing users do not retire prior observations. The terminal page ends the sweep and the next poll starts without a token.

Up to 100 rows and 36 KiB per response. The bundled parser is required. Pages publish rows and their next
position together. Use [source health and controls](https://docs.bijection.com/integrations/native-rest.md#feed-contracts)
to review failures and recover the feed.

[Provider API reference](https://developers.google.com/workspace/admin/directory/reference/rest/v1/users/list)

## Write users

Follow the [native write app guide](https://docs.bijection.com/integrations/native-rest.md#native-provider-writes). Bind `providerWriter("google-directory.users.create-update", { endpoint: "https://admin.googleapis.com", auth }, data)` and pass it as `receivers.writers["google-directory.users.create-update"]`. Seal an authorized Workspace administrator OAuth credential. Bind a protected label for user provisioning fields. Use the immutable decimal user ID for update and the Directory User object for the payload. HTTP 200 must return the ID. To suspend an account, set `suspended: true` on update. Permanent user deletion and associated Workspace data removal are outside this mode.

The writer records its evidence under the app's `data` label. Commands take up to 24 KiB of JSON and carry no read cursor.

[Provider write API](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.