For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tenants

Overview

The Tenants API lists the Google Workspace and Microsoft 365 tenants connected to Material that your API token can reach. Use it to find which tenant a tenant ID (tnt.1.<base64>) refers to, and to find the ID to pass to a tenant filter or a role assignment.

Two endpoints make up the Tenants API:

  • List Tenants (GET /api/v1/tenants): page through the tenants your token can reach, sorted by name

  • Get Tenant (GET /api/v1/tenants/{id}): retrieve a single tenant by its encoded ID

Each tenant reports its display name, its provider (google or microsoft), the provider's own ID for it (the Google Workspace customer ID or the Microsoft Entra tenant ID), its primary domain, and its domains. Tenants are read-only through the API.

Permissions

Listing and retrieving tenants requires the same read permission as accounts and groups. Endpoints that take a tenant ID can require more permissions.

Response Structure

The list follows the standard two-part structure: a meta object (with totalCount, limit, hasMore, and nextCursor) and an items array of tenant objects. It doesn't take any filters.

Want a walkthrough?

Review Hello World.

Pagination and Rate Limiting

  • Material APIs use cursor-based pagination: pass the nextCursor value from one response as the cursor parameter in the next request.

  • The limit parameter controls page size and is locked into the cursor, so later pages keep the page size of the first request.

  • When hasMore is false and nextCursor is null, you've reached the last page.

List Tenants

get

Lists the Google Workspace and Microsoft 365 tenants your API token can reach, sorted by name. Each tenant includes the encoded ID that you pass to tenant filters and that tenantId fields return. Requires the same read permission as accounts and groups.

Authorizations
x-material-client-secretstringRequired

Material Security API key

Query parameters
cursorstringOptional

The pagination cursor returned in a previous response. Pass this value to retrieve the next page of results.

Example: eyJ2IjoxLCJvIjoyNSwibCI6MjV9
limitintegerOptional

The maximum number of items to return per page.

Example: 25
Responses
200

Successful response

application/json
get/api/v1/tenants
GET /api/v1/tenants HTTP/1.1
Host: your-instance.on.material.security
x-material-client-secret: YOUR_API_KEY
Accept: */*
{
  "meta": {
    "totalCount": 1,
    "limit": 1,
    "hasMore": true,
    "nextCursor": "text"
  },
  "items": [
    {
      "id": "tnt.1.ZXhhbXBsZV9pZF8xMjM",
      "name": "example.com",
      "csp": "google",
      "providerTenantId": "C0acme123",
      "primaryDomain": "example.com",
      "domains": [
        "example.com",
        "example.org"
      ],
      "keyEvents": {
        "created": {
          "at": "2026-01-01T00:00:00.000Z"
        }
      }
    }
  ]
}

Get Tenant

get

Retrieves a single tenant by its encoded ID, including its name, csp (google or microsoft), provider tenant ID, and domains.

Authorizations
x-material-client-secretstringRequired

Material Security API key

Path parameters
idstringRequired

The encoded ID of the tenant to retrieve. Format: tnt.1.<base64>.

Example: tnt.1.ZXhhbXBsZV9pZF8xMjMPattern: ^[a-z]{1,6}\.[0-9]{1,2}\.[A-Za-z0-9_-]+$
Responses
200

Successful response

application/json

A Google Workspace or Microsoft 365 tenant connected to Material.

idstringRequired

The encoded tenant ID, the value tenant filters take and tenantId fields return. Format: tnt.1.<base64>.

Example: tnt.1.ZXhhbXBsZV9pZF8xMjM
namestringRequired

The tenant's display name: the custom name set in Material, otherwise the first of domains. A tenant with no domains yet falls back to a name inferred from the provider.

Example: example.com
cspstring · enumRequired

Cloud service provider (microsoft or google)

Example: googlePossible values:
providerTenantIdstringRequired

The tenant's ID at the provider: the Google Workspace customer ID, or the Microsoft Entra tenant ID.

Example: C0acme123
primaryDomainstring · nullableRequired

The provider's primary domain for the tenant. Null until Material has synced it from the provider.

Example: example.com
domainsstring[]Required

The tenant's domains, primaryDomain first. Normally the provider's verified and alias domains. Until a provider sync succeeds, Material fills this from the domains of the tenant's account emails instead.

Example: ["example.com","example.org"]
get/api/v1/tenants/{id}
GET /api/v1/tenants/{id} HTTP/1.1
Host: your-instance.on.material.security
x-material-client-secret: YOUR_API_KEY
Accept: */*
{
  "id": "tnt.1.ZXhhbXBsZV9pZF8xMjM",
  "name": "example.com",
  "csp": "google",
  "providerTenantId": "C0acme123",
  "primaryDomain": "example.com",
  "domains": [
    "example.com",
    "example.org"
  ],
  "keyEvents": {
    "created": {
      "at": "2026-01-01T00:00:00.000Z"
    }
  }
}

Last updated

Was this helpful?