Slack Error: 'team_not_found' — Cause, Fix, and Troubleshooting Guide
Fix the Slack team_not_found error: the workspace/team for your token or team_id parameter can't be resolved. Verify with auth.test and correct the team id.
- #slack
- #api
- #troubleshooting
- #errors
Stuck on this Slack error? Get the free incident triage checklist
A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.
Overview
team_not_found means Slack could not resolve the workspace (team) implied by your request — either the token’s home workspace is gone, or a team_id/team parameter you passed doesn’t map to a real workspace visible to this token.
{
"ok": false,
"error": "team_not_found"
}
It shows up on general Web API calls and, more often, on Enterprise Grid / admin methods that take an explicit team_id.
Symptoms
auth.testfails, or admin methods fail while other calls succeed.- A hard-coded
team_idstopped resolving after an org change. - Cross-workspace calls on Grid fail for one specific workspace.
Common Root Causes
1. Wrong or stale team_id parameter
Admin/Grid methods take a team_id; a typo or an id from a removed workspace yields team_not_found.
2. The token’s workspace was deleted or migrated
If the workspace behind the token is gone (deleted, or migrated into/out of an org), Slack can’t resolve it.
3. Token not authorised for the target workspace on Grid
An org-level token calling a workspace it isn’t installed on can’t find that team.
How to diagnose
Establish which team the token actually belongs to:
curl -s https://slack.com/api/auth.test \
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
{"ok": true, "team": "ACME Prod", "team_id": "T0AAAAAAA", "enterprise_id": "E0AAAAAAA"}
Then confirm the team_id you pass to an admin method matches a real workspace:
curl -s "https://slack.com/api/admin.teams.list?limit=100" \
-H "Authorization: Bearer $SLACK_ORG_TOKEN" | head -c 400
If your target team_id isn’t in the list, it’s wrong or the org token can’t see it.
Fixes
- Use the
team_idfromauth.test(oradmin.teams.list) rather than a hard-coded value. - Re-pull tokens after any workspace deletion/migration; treat the old ones as dead.
- For Grid admin calls, ensure the org-level token is installed on and authorised for the target workspace.
- Validate the
team_idat startup so a wrong id fails loudly on boot, not mid-run.
What to watch out for
team_not_found(workspace can’t be resolved) is distinct frominvalid_auth(token itself is bad) andaccount_inactive(the app/user is disabled) — checkauth.testto tell them apart.- On Enterprise Grid, workspace ids can change during migrations; don’t hard-code them into automation.
- Store the resolved
team_idalongside the token in your secret store so multi-workspace apps always pair the two correctly.
Related
- Slack Error: ‘invalid_auth’
- Slack Error: ‘account_inactive’
- Multi-workspace Slack app OAuth and token storage
Fixed it? Get 500 Slack & DevOps AI prompts — free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.
Did this fix your issue?
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.