Offboard someone who leaves
What you get: when your identity provider deactivates a person, Ambit stops their access within seconds. It deletes their personal API keys, ends their console sessions, blocks tokens that are still valid and revokes their connected apps at the vendor. It keeps a record of what it did.
Before you start
You need:
-
the cluster from the Quick start with the people of Different models for different teams. This guide offboards User04, who is in
engineering; -
the model rule
engineering-modelsand the tool ruleengineering-time(Give an agent tools and apps), so that User04 has something to lose; -
no budgets that block User04. If you did Set spending limits, delete its budgets first and wait a minute:
kubectl -n ambit-system delete budgets.ambitproject.dev engineering sales -
two personal API keys for User04, made in the console as in Connect your coding agents: one with the scope LLM, in
USER04_KEY, and one with the scope MCP, inUSER04_MCP_KEY. Keep User04 signed in to the console in a browser. User01 also needs a key, inUSER01_KEY.
In real use, your identity provider (Okta, Entra ID) sends the SCIM requests. In this guide you send them yourself with curl, so you can see each step.
1. Find the SCIM address and token
In the console, open Settings and then Offboarding. The page shows the base URL of the SCIM endpoint and a bearer token behind Show token. In your identity provider, add a SCIM app with this URL and token, and turn on Deactivate users.
For this guide, read the token from the cluster. The command puts it in a variable without printing it:
SCIM=http://console.localtest.me:8080/scim/v2
SCIM_TOKEN=$(kubectl -n ambit-system get secret ambit-console-keys -o jsonpath='{.data.scim-token}' | base64 -d)
The endpoint refuses requests without the token:
curl -s -o /dev/null -w 'HTTP %{http_code}\n' $SCIM/Users
HTTP 401
2. Provision User04
Your identity provider creates a user in Ambit before it can deactivate one. Create User04 the way the provider does:
curl -s -X POST $SCIM/Users -H "Authorization: Bearer $SCIM_TOKEN" -H 'Content-Type: application/scim+json' \
-d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:User"],"userName":"user04@example.com","active":true,"emails":[{"value":"user04@example.com","primary":true}]}' | tee user04-scim.json
ID=$(sed -E 's/.*"id":"([^"]+)".*/\1/' user04-scim.json)
The answer has "active":true and an id. The address in userName and emails must be the address User04 signs in with.
Check that User04 has access
Before you offboard User04, check that the keys and the session of that person work. The function mcp is the one from Give an agent tools and apps.
curl -s -o /dev/null -w 'User04 LLM key: HTTP %{http_code}\n' http://llm.localtest.me:8080/v1/chat/completions \
-H "Authorization: Bearer $USER04_KEY" -H 'Content-Type: application/json' \
-d '{"model":"nvidia/nemotron-3-super-120b-a12b:free","messages":[{"role":"user","content":"hi"}]}'
mcp "$USER04_MCP_KEY" '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
The first command prints User04 LLM key: HTTP 200. The second lists the tool time_get_current_time. In the console, Settings and Keys list User04's keys as Active, and User04's browser is signed in.
3. Deactivate User04
curl -s -w '\nHTTP %{http_code}\n' -X PATCH $SCIM/Users/$ID -H "Authorization: Bearer $SCIM_TOKEN" -H 'Content-Type: application/scim+json' \
-d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"Replace","path":"active","value":"False"}]}'
The answer has "active":false and ends with HTTP 200. Deleting the user in the identity provider (DELETE $SCIM/Users/$ID) has the same effect.
Check it works
Run the same checks as before. The gateway needs a few seconds to learn about the block, so repeat a command if it still shows 200.
curl -s -o /dev/null -w 'User04 LLM key: HTTP %{http_code}\n' http://llm.localtest.me:8080/v1/chat/completions \
-H "Authorization: Bearer $USER04_KEY" -H 'Content-Type: application/json' \
-d '{"model":"nvidia/nemotron-3-super-120b-a12b:free","messages":[{"role":"user","content":"hi"}]}'
mcp "$USER04_MCP_KEY" '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
User04 LLM key: HTTP 403
authorization failed
HTTP 403
User04's console session ended. Reload the console in the browser of that person, and it shows the sign-in page. The console API answers 401 for the session cookie of that person. The keys are deleted, not only blocked: as an admin, open Settings and Keys and see that User04 has none. User01 is not affected:
curl -s -o /dev/null -w 'User01 LLM key: HTTP %{http_code}\n' http://llm.localtest.me:8080/v1/chat/completions \
-H "Authorization: Bearer $USER01_KEY" -H 'Content-Type: application/json' \
-d '{"model":"nvidia/nemotron-3-super-120b-a12b:free","messages":[{"role":"user","content":"hi"}]}'
User01 LLM key: HTTP 200
The record
Ambit keeps a record of each offboarding. As an admin, open Settings and Offboarding, or read the same data from the console API. The record for User04 looks like this. Your times and counts are different:
{
"email": "user04@example.com",
"at": "2026-10-13T08:20:07.193204178Z",
"trigger": "scim PATCH active=false",
"grants": [],
"sessionsEnded": 2,
"gatewayBlocked": true,
"keysDeleted": 3,
"completeSuccess": true
}
sessionsEnded: the console sessions that were ended.gatewayBlocked: the gateways now refuse the person's email, even for a token that has not expired.keysDeleted: the personal API keys that were deleted.grants: one line for each connected app, withrevokedAtProviderset totruewhen the vendor confirmed the revocation. The list is empty here because User04 connected no app. A revocation that a vendor does not confirm shows its error and marks the recordcompleteSuccess: false. Which vendors truly revoke is in Offboarding.
4. Prove it to an auditor
In the console, open Settings → Evidence. In Offboarding, set both dates to today and select Download. In offboarding.csv of the ZIP file, the row for user04@example.com has gateway_blocked true and accepted_calls_after 0: from 5 seconds after the offboarding (calls already in flight) until the export, the gateway accepted no call of User04 that the audit store kept. first_refused_call_after has the time of the first refused request from the Check it works step. These three columns come from the audit store: without evidence.enabled: true they are empty, and the manifest says why. The page shows the ZIP's SHA-256; send it to the auditor with the file. What each column means is in Offboarding.
If the person comes back
Reactivating the user in the identity provider lifts the block. The old keys and app grants stay deleted. The person signs in and creates new keys.
While a user is deactivated, the console refuses to make keys for that person with this person is offboarded.
Related
- Offboarding: which vendors truly revoke a person's grants.
- Personal API keys: how keys follow the identity, and what offboarding does to them.
- Give an agent tools and apps: connected apps.
- Do a quarterly access review: the access review export.