DocsAPI Reference
Admin Guide

Connected applications

Let an application such as work-agents sign people in with their Tokamak account, read your organization's members and changes, and act for the people who allow it.


A connected application uses Tokamak as its sign-in and organization authority. People sign in to it with their Tokamak account. Tokamak tells it which of their organizations they may enter. When someone leaves your organization, is suspended, or the application is turned off, the application learns about it from Tokamak.

Your Tokamak operator registers the applications a deployment offers. Organization admins decide whether each one is enabled for their organization. Each member decides whether it may read Tokamak analytics as them.

Enable an application

Under Organization settings › Applications, switch the application on. Only org.admin can do this.

The Connected applications panel: Work agents enabled, with its sign-in client work-agents, a Create directory token button and an on switch; below, the Directory tokens table
Work agents enabled for Acme Corp. Local test organization. Open full size ↗

From then on, a member who signs in to the application may enter it in this organization. All of these must hold:

  • their membership is active;
  • their account is not suspended;
  • the organization is not archived.

Each answer is valid for a few minutes at most, and the application asks again before it lets someone in. So removing a member, suspending them, or turning the application off takes effect at once.

Turning the application off also revokes its directory tokens and every member's permission to act for them. Turning it back on restores none of these.

Give the application a directory token

The application's server keeps its own list of your members with a directory token. Select Create directory token, name it and copy it once. A directory token reads only:

  • this organization's members: account, email, role and whether the account is active or suspended;
  • the changes to them, in order: joins, removals, role changes, suspensions and restorations, and the application or a permission being turned on or off.

It cannot read usage or analytics, act for anyone, or see any other organization.

The Directory tokens table with an active work-agents-sync token and a revoked one, each with created by Ada Admin, last used, expiry and status
One active token; the older one was revoked when the application was turned off. Local test values. Open full size ↗

To rotate, create a new token, switch the application over, then revoke the old one. An organization holds at most five active directory tokens per application.

Let the application act for you

Every member decides for themself, under Account › Connected applications (open the account menu at the foot of the sidebar). Members don't need any organization permission for this page. Admins also see the same panel under Organization settings › Applications. Select Allow, then choose what it may read as you (usage and cost, insights) and for how long.

Allow Work agents to act for you dialog: Usage and cost ticked, Insights unticked, for 90 days, Allow button
Choosing what the application may read as you. Open full size ↗
Let an application act for you: Work agents, Allowed, Usage and cost until a date, with Change and Withdraw buttons
Allowed. Withdraw at any time. Open full size ↗

The application then reads Tokamak analytics as you, never beyond what you can read yourself or what you allowed. Every answer names you, the application and your permission. Withdraw stops it immediately. Leaving the organization, or the application being turned off, also ends it.

Connect the application's server

An admin creates an MCP token under Organization settings › MCP and chooses the application under Issued to. Only a token issued to an application can act for members who allowed it.

If this deployment has no registered applications, an admin can still explicitly choose No application (organization only). This is never selected automatically, and other failures to load connected applications block token creation until a successful retry.

Create an MCP token dialog: name work-agents, Usage analytics ticked, Issued to Work agents, expires in 90 days
An MCP token issued to Work agents. Local test organization. Open full size ↗

The application's server sends the member's Tokamak account id in X-Tokamak-Act-For with that token. Organizations that already used MCP tokens before this release may still name a member by email (X-Tokamak-User-Email). Turn Let tokens act for a member named by email off once your servers send X-Tokamak-Act-For. In a new organization it starts off.

The Insights & usage MCP panel with MCP enabled and the Let tokens act for a member named by email switch off
The legacy email path is off: only members who allowed the application can be acted for. Open full size ↗

For application developers

The contract (eligibility, directory and change feed, delegations, error codes) is in the backend reference, connected applications. In short:

  • Sign people in with your own confidential client in the realm, using authorization code with PKCE. Its access tokens must name your client as both audience and authorized party.
  • Call POST /auth/apps/eligibility with the person's access token. Admit them only on allow, and never past valid_until. Treat unknown, an error or an expired answer as a deny.
  • Keep your member list from GET /auth/directory/v1/members plus GET /auth/directory/v1/events, replaying the feed from the snapshot's watermark. On 410 cursor_expired, take a new snapshot.
  • A missing page or an error is never "everyone left".

Settings for operators

VariableDefaultDescription
TOKAMAK_AUTH_APPLICATIONS—Registered applications, id=realm_client[=Display name], comma-separated
TOKAMAK_AUTH_APP_ELIGIBILITY_TTL5mLongest an eligibility answer stays valid
TOKAMAK_AUTH_IDENTITY_EVENT_RETENTION720hHow long the change feed keeps events
TOKAMAK_AUTH_REBIND_FROM_ISSUERSthe legacy issuersIssuers an account may be moved away from by verified email

Not covered

  • Enablement is per organization; there is no per-person assignment yet.
  • Teams appear as role changes. Other group sync, SCIM and changing Slack or GitHub access are not provided.
  • An account disabled in your identity provider reaches Tokamak through directory lifecycle sync when your operator runs it, within its interval.

On this page