MetorialDocs

Set up Google Admin in Metorial for Claude, ChatGPT and Cursor

Share Google Admin with your team in Claude, ChatGPT and Cursor through Metorial: OAuth sign-in, 22 tools (7 read-only).

To give your team Google Admin in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Google Admin integration in a Metorial portal, and each person signs in to Google Admin with their own account. Agents can manage Google Workspace organizations programmatically. The integration has 22 tools, 7 read-only, 14 write and 1 destructive, plus 3 triggers.

What you'll learn

  • How an admin shares Google Admin in a portal and how each person connects
  • The 29 OAuth scopes Google Admin can request, and what each one allows
  • How to keep the 7 read-only tools and reject the other 15

Before you start

Sign-in method

MethodTypeWhat a person provides
Google OAuth 2.0OAuthSigns in to Google Admin

Google OAuth 2.0

People sign in to Google Admin and approve the scopes you allow. The integration can request:

ScopeNameWhat it allows
https://www.googleapis.com/auth/admin.directory.userUsers (Read/Write)Full access to manage users
https://www.googleapis.com/auth/admin.directory.user.readonlyUsers (Read Only)View user information
https://www.googleapis.com/auth/admin.directory.user.aliasUser Aliases (Read/Write)Manage user email aliases
https://www.googleapis.com/auth/admin.directory.user.alias.readonlyUser Aliases (Read Only)View user email aliases
https://www.googleapis.com/auth/admin.directory.groupGroups (Read/Write)Full access to manage groups
https://www.googleapis.com/auth/admin.directory.group.readonlyGroups (Read Only)View group information
https://www.googleapis.com/auth/admin.directory.group.memberGroup Members (Read/Write)Manage group membership
https://www.googleapis.com/auth/admin.directory.group.member.readonlyGroup Members (Read Only)View group membership
https://www.googleapis.com/auth/apps.groups.settingsGroups SettingsManage group settings and policies
https://www.googleapis.com/auth/admin.directory.orgunitOrg Units (Read/Write)Manage organizational units
https://www.googleapis.com/auth/admin.directory.orgunit.readonlyOrg Units (Read Only)View organizational units
https://www.googleapis.com/auth/admin.directory.rolemanagementRoles (Read/Write)Manage admin roles and assignments
https://www.googleapis.com/auth/admin.directory.rolemanagement.readonlyRoles (Read Only)View admin roles and assignments
https://www.googleapis.com/auth/admin.directory.device.chromeosChromeOS Devices (Read/Write)Manage ChromeOS devices
https://www.googleapis.com/auth/admin.directory.device.chromeos.readonlyChromeOS Devices (Read Only)View ChromeOS devices
https://www.googleapis.com/auth/admin.directory.device.mobileMobile Devices (Read/Write)Manage mobile devices
https://www.googleapis.com/auth/admin.directory.device.mobile.readonlyMobile Devices (Read Only)View mobile devices
https://www.googleapis.com/auth/admin.directory.domainDomains (Read/Write)Manage domains and domain aliases
https://www.googleapis.com/auth/admin.directory.domain.readonlyDomains (Read Only)View domains and domain aliases
https://www.googleapis.com/auth/admin.directory.customerCustomers (Read/Write)Manage customer account information
https://www.googleapis.com/auth/admin.directory.customer.readonlyCustomers (Read Only)View customer account information
https://www.googleapis.com/auth/admin.directory.resource.calendarCalendar Resources (Read/Write)Manage calendar resources such as rooms and equipment
https://www.googleapis.com/auth/admin.directory.resource.calendar.readonlyCalendar Resources (Read Only)View calendar resources
https://www.googleapis.com/auth/admin.reports.audit.readonlyAudit Reports (Read Only)View admin audit logs and activity reports
https://www.googleapis.com/auth/admin.reports.usage.readonlyUsage Reports (Read Only)View usage reports for apps and entities
https://www.googleapis.com/auth/apps.licensingLicensingManage Google Workspace product licenses
https://www.googleapis.com/auth/admin.datatransferData TransferManage ownership transfers of user data between Workspace users
https://www.googleapis.com/auth/userinfo.emailUser ProfileView basic profile info of the authenticated user
https://www.googleapis.com/auth/userinfo.profileUser Profile NameView the name of the authenticated user

Setup settings

Setup also asks for:

  • domain (optional): Primary Google Workspace domain (e.g. example.com). Used to scope API calls to a specific domain.
  • customerId (optional): Google Workspace customer ID (e.g. C03az79cb). If not provided, "my_customer" is used to refer to the authenticated user's customer.

Use your own Google Admin OAuth app

With your own OAuth app, people see your company's name on the Google Admin consent screen, and the client ID and secret belong to you.

Start the credentials in Metorial

In the dashboard, select Settings, then Organization Settings. Under Integrations and MCP, select Provider Auth, then Create Auth Credentials. Choose Google Admin and copy the Redirect URI.

Register the app

In the Google Cloud console, enable the API behind Google Admin under APIs & Services, Library. Then go to Google Auth platform, Clients, click Create Client, choose Web application, and paste the redirect URI from Metorial under Authorized redirect URIs. Google shows the client secret only when you create the client.

The Google Workspace guide covers the consent screen and the OAuth client in Google Cloud step by step.

Finish in Metorial

Copy the app's client ID and client secret. Back in Metorial, enter a Name, the Client ID and the Client Secret, review Scopes, and select Create. Then pick these credentials for the Google Admin integration.

Admin: share Google Admin in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose Google Admin. For how members connect, choose Each person connects, so everyone signs in to Google Admin as themselves.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Google Admin.

Choose who gets it

Add the access groups that should see Google Admin. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user Google Admin integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search "google admin"

Employee: connect Google Admin

In the portal

Open Google Admin in the catalog

Sign in to your portal and open Google Admin. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. A Google Admin sign-in tab opens. Sign in and approve the permissions listed.

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search "google admin"
metorial setup <catalog-item-id>

catalog search prints the catalog item ID.

Add it to your AI client

metorial install adds your Google Admin connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list "google admin"
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 7 read-only tools, such as get_user and list_users, and lose the 14 write tools, such as create_user or update_user, and the destructive tool delete_user.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list "google admin"
metorial tools <integration-id>
metorial call <integration-id> get_customer_info -d '{}'

metorial tools lists the 22 tools, minus any you rejected. get_customer_info takes no input. It retrieves Google Workspace customer account information including the primary domain, customer ID, language, postal address, and admin contact details.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (7)

  • get_activity_reports: Retrieve audit activity logs for admin actions, user logins, Drive activity, and other application events. Needs userKey and applicationName.
  • get_user: Retrieve detailed information about a specific user by their email address or unique user ID. Needs userKey.
  • get_customer_info: Retrieve Google Workspace customer account information including the primary domain, customer ID, language, postal address, and admin contact details.
  • list_groups: Search and list groups in the Google Workspace domain.
  • list_users: Search and list user accounts in the Google Workspace domain.
  • get_usage_reports: Retrieve usage reports at the customer or user level. Needs reportType and date.
  • get_group_settings: Read a Google Workspace group's access, posting, and moderation settings by its email address.

Write tools (14)

  • create_user: Create a new user account in the Google Workspace domain. Needs primaryEmail, givenName and familyName.
  • transfer_data: Transfer ownership of application data (Drive files, Calendar, etc.) from one user to another. Needs action.
  • manage_org_units: List, create, update, or delete organizational units (OUs) in the Google Workspace hierarchy. Needs action.
  • manage_domains: List, get, add, or delete domains associated with the Google Workspace account. Needs action.
  • manage_mobile_devices: List, get, perform actions on, or delete mobile devices. Needs action.
  • manage_chromeos_devices: List, get, update, or perform actions on ChromeOS devices. Needs action.
  • manage_group_members: List, add, update, or remove members from a Google Workspace group. Needs groupKey and action.
  • manage_group: Create, update, or delete a Google Workspace group. Needs action.
  • manage_roles: List, create, or delete admin roles, and manage role assignments. Needs action.
  • manage_licenses: Assign, get, or revoke Google Workspace product licenses for users. Needs action and productId.
  • update_user: Update an existing user's profile, account settings, admin status, or organizational unit. Needs userKey.
  • manage_calendar_resources: List, create, update, or delete calendar resources like meeting rooms and equipment. Needs action.
  • manage_user_aliases: List, add, or remove email aliases for a user. Needs userKey and action.
  • update_group_settings: Change selected access, posting, or moderation settings of an existing Google Workspace group.

Destructive tools (1)

  • delete_user: Delete a user account from the Google Workspace domain. Needs userKey and action.

Triggers

Google Admin has 3 triggers, which fire on events in Google Admin:

  • user_deleted: An administrator deleted a Workspace user, as recorded in the admin audit log.
  • user_created: An administrator created a Workspace user, as recorded in the admin audit log.
  • user_suspended: An administrator suspended a Workspace user, as recorded in the admin audit log.

Next steps