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 nameGet 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
nextCursorvalue from one response as thecursorparameter in the next request.The
limitparameter controls page size and is locked into the cursor, so later pages keep the page size of the first request.When
hasMoreis false andnextCursoris null, you've reached the last page.
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.
Material Security API key
The pagination cursor returned in a previous response. Pass this value to retrieve the next page of results.
eyJ2IjoxLCJvIjoyNSwibCI6MjV9The maximum number of items to return per page.
25Successful response
Bad request: invalid parameters or request body
Unauthorized: missing or invalid API key
Forbidden: the API key doesn't have permission to perform this action
Not found: the requested resource doesn't exist
Too many requests: you've reached a rate limit. When the response includes a Retry-After header, wait that many seconds before you try again.
Internal server error
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"
}
}
}
]
}Retrieves a single tenant by its encoded ID, including its name, csp (google or microsoft), provider tenant ID, and domains.
Material Security API key
The encoded ID of the tenant to retrieve. Format: tnt.1.<base64>.
tnt.1.ZXhhbXBsZV9pZF8xMjMPattern: ^[a-z]{1,6}\.[0-9]{1,2}\.[A-Za-z0-9_-]+$Successful response
A Google Workspace or Microsoft 365 tenant connected to Material.
The encoded tenant ID, the value tenant filters take and tenantId fields return. Format: tnt.1.<base64>.
tnt.1.ZXhhbXBsZV9pZF8xMjMThe 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.comCloud service provider (microsoft or google)
googlePossible values: The tenant's ID at the provider: the Google Workspace customer ID, or the Microsoft Entra tenant ID.
C0acme123The provider's primary domain for the tenant. Null until Material has synced it from the provider.
example.comThe 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.com","example.org"]Bad request: invalid parameters or request body
Unauthorized: missing or invalid API key
Forbidden: the API key doesn't have permission to perform this action
Not found: the requested resource doesn't exist
Too many requests: you've reached a rate limit. When the response includes a Retry-After header, wait that many seconds before you try again.
Internal server error
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?

