warpdotdev/warp · error · anyhow::Error
User is not on a team
Error message
User is not on a team
What it means
A team-scoped OAuth connect URL needs a team principal, resolved via UserWorkspaces.sole_team_uid(). If no single team can be resolved for the logged-in user, the URL cannot be built and the command fails. Note the comment: the login-less auth flow is still a TODO, so this path is early.
Source
Thrown at app/src/ai/agent_sdk/provider.rs:64
&& provider_type.allowed_in_personal_context()
{
return Err(anyhow::anyhow!(
"Provider '{}' must be setup for either a team or personal account",
provider_type.slug()
));
}
use_team_auth = provider_type.allowed_in_team_context();
} else if personal {
use_team_auth = false;
}
// TODO(bens): initiate the OAuth flow and use the login-less auth URL
let slug = provider_type.slug();
let url = if use_team_auth {
let team_uid = match UserWorkspaces::as_ref(ctx).sole_team_uid() {
Some(uid) => uid,
None => {
return Err(anyhow::anyhow!("User is not on a team"));
}
};
format!("{server_url}/oauth/connect/{slug}?principalType=team&principalId={team_uid}")
} else {
format!("{server_url}/oauth/connect/{slug}")
};
println!("To authenticate {slug}, open this URL in your browser: {url}");
// Open the URL in the default browser
ctx.open_url(&url);
// TODO(bens): poll/subscribe until connection is created
ctx.terminate_app(TerminationMode::ForceTerminate, None);
Ok(())
}View on GitHub (pinned to e72fd7aacb)
Solutions
- Accept the team invitation and confirm you are logged into the right account
- Re-run so workspace metadata refreshes with the new team membership
- If the provider allows personal context, use --personal instead
Example fix
# before warp provider setup github --team # account has no team # after warp provider setup github --personal # or join a team first, then retry
Defensive patterns
Strategy: validation
Validate before calling
# Team-scoped setup needs a resolvable team; check membership first
team_uid=$(warp whoami --output-format json 2>/dev/null | jq -r '.teams[0].uid // empty')
[ -n "$team_uid" ] || { echo 'no team on this account; use --personal if the provider allows' >&2; exit 1; }
warp provider setup "$slug" --team Try / catch
out=$(warp provider setup "$slug" --team 2>&1) || { case "$out" in *'User is not on a team'*) warp provider setup "$slug" --personal || { echo "$out" >&2; exit 1; };; *) echo "$out" >&2; exit 1;; esac; } Prevention
- Accept team invites and verify membership before team-scoped provider setup
- Re-run once after joining so workspace metadata refreshes
- Confirm you are logged into the account that belongs to the team
When it happens
Trigger: `warp provider setup <slug> --team` (or a team-only provider where use_team_auth defaults true) when the user belongs to no team, or workspace metadata has not refreshed the team list yet.
Common situations: New accounts that have not accepted a team invite; running immediately after joining a team with stale metadata; logged into a personal account while following team-oriented instructions.
Related errors
- Timed out waiting for OAuth authorization
- Provider '{}' must be setup for either a team or personal ac
- Exceeded maximum number of authorization attempts ({}). Plea
- GitHub authorization failed. Please try again.
- GitHub authorization expired. Please try again.
AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16).
Data as JSON: /api/errors/afdd67d6c1c06ba4.
Report an issue: GitHub.