Claude Code setup guide
Configure ANTHROPIC_BASE_URL and your token in ~/.claude/settings.json for predictable monthly billing.
When Claude Code rejects a claude.ai login with “Your organization has disabled Claude subscription access for Claude Code,” the block comes from an org admin policy, a cached workspace session, or a system-level managed-settings.json file.
If starting Claude Code or completing browser OAuth drops you straight into the message below, the server or a local enterprise policy is blocking claude.ai subscription sign-ins for your account:
Your organization has disabled Claude subscription access for Claude Code.Use an Anthropic API key instead.Fastest way back in: To return to a personal Pro or Max plan, run claude /logout to clear the cached organization session and sign in again. To bypass organization OAuth right now, export ANTHROPIC_API_KEY or point ~/.claude/settings.json at CodingPass.
This error does not mean your Claude Code binary is broken. Use the table below to identify which layer is rejecting the login and jump straight to the right fix:
| Scenario | Root cause | Exact fix |
|---|---|---|
| Company Team or Enterprise seat | An admin disabled Claude Code subscription access in the Anthropic Admin Console, or your seat tier does not include Claude Code | Ask your admin to update your seat or toggle access; if company policy requires API auth, switch to an API key or gateway |
| Personal Pro / Max account tied to an old org | ~/.claude.json cached a restricted organization ID, or a personal subscription payment failed | Run claude /logout, clear stray env vars, verify billing on claude.ai, and log back into your personal account |
| Company-managed laptop (MDM / IT policy) | A system-wide managed-settings.json sets forceLoginMethod or forceLoginOrgUUID | Inspect the managed config path; user settings cannot override it, so follow your IT team’s API auth method |
| Moving to API billing or a fixed-budget plan | You want Claude Code separated from org OAuth policies or capped at a predictable monthly spend | Set ANTHROPIC_API_KEY for Anthropic Console billing, or configure ANTHROPIC_BASE_URL for CodingPass |
On Anthropic Team and Enterprise plans, organization admins control which seat types can sign in to Claude Code over claude.ai OAuth, and they can enforce that boundary through SSO and SCIM groups.
If you sign in with a work email, two things are common:
If you ever joined a company workspace with the same email or switched between work and personal accounts on one machine, Claude Code may still hold the restricted organization in its local OAuth state.
Clear the session and check for conflicting shell variables before signing in again:
# 1. Sign out of the current Claude Code sessionclaude /logout # 2. Check for leftover Anthropic environment variablesenv | grep -i anthropicIf step 2 prints an old ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN, unset them in the current shell and remove the lines from ~/.zshrc, ~/.bashrc, or a local .env file:
unset ANTHROPIC_API_KEYunset ANTHROPIC_AUTH_TOKENNext, check whether ~/.claude.json still holds an old oauthAccount block, then restart claude and authenticate with your personal account:
# Check cached account metadata (back up ~/.claude.json before editing if needed)grep -n "oauthAccount" ~/.claude.json # Start Claude Code and log in with your personal Pro / Max accountclaudeIf you are not part of any company organization at all, open billing settings on claude.ai as well. A declined card or lapsed personal Pro/Max subscription can occasionally surface as a credential block until payment is updated and you log in again.
managed-settings.jsonEnterprise IT teams can deploy managed-settings.json to lock down how Claude Code authenticates. That file sits at the very top of Claude Code’s settings precedence, so ~/.claude/settings.json and CLI flags cannot override it.
If it defines "forceLoginMethod": "console" or pins forceLoginOrgUUID to a workspace that forbids subscription login, browser OAuth will keep failing. Check the system path for your OS:
# macOScat "/Library/Application Support/ClaudeCode/managed-settings.json" # Linux / WSLcat /etc/claude-code/managed-settings.jsonOn Windows, the managed path is C:\Program Files\ClaudeCode\managed-settings.json (or Registry policy keys under HKLM\SOFTWARE\Policies\ClaudeCode).
You can also run /status inside Claude Code to inspect the active authentication method and config source. If a managed policy is enforced by IT, do not delete it manually—ask your admin which API or gateway credential is approved for your machine.
When subscription OAuth is off the table, switching to API-based authentication follows the exact fallback named in the error message.
Create a key in the Anthropic Console, export it in your shell, and start claude:
export ANTHROPIC_API_KEY="sk-ant-api03-..."claudeAdd the export line to ~/.zshrc or ~/.bashrc to keep it across sessions. Usage is billed per token directly in the Anthropic Console rather than against a claude.ai subscription, so set a monthly spend limit in the Console if you run long agent loops.
If you want API-key auth without open-ended token bills—plus access to flagship Claude models and 25 models total under one key—configure CodingPass in ~/.claude/settings.json:
{ "env": { "ANTHROPIC_BASE_URL": "https://codingpass.ai", "ANTHROPIC_AUTH_TOKEN": "cp-live-…" }, "model": "claude-sonnet-5-5"}Restart claude and run /status. Once Anthropic base URL shows https://codingpass.ai, every session routes through your CodingPass allowance instead of claude.ai OAuth.
The Go plan starts at $10/month (about 2,050 Sonnet requests per month on typical Claude Code traffic), Plus is $30/month for Opus-heavy refactors, and Team Pass starts at $200/month for shared team budgets. Every plan is metered at official API prices and stops at your cap with no surprise charges. See the Claude Code setup guide, all models, and pricing for full details.
No. ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN only control Claude Code and editor extensions that read the same settings. Your claude.ai web subscription stays untouched, and removing those variables lets you return to subscription login anytime your org allows it.
~/.claude/settings.json, so why do I still see the same error?Two things usually cause this: an old OAuth session or ANTHROPIC_API_KEY is still active in your shell (run claude /logout and open a fresh terminal), or a higher-priority managed-settings.json is overriding user settings. Running /status shows which config source won.
Yes. Both editor extensions run the same Claude Code backend and read the "env" block from ~/.claude/settings.json. Save the file and fully restart your IDE so the extension picks up the new base URL and token.
Keep Claude Code and your workflow intact. Point ~/.claude/settings.json at CodingPass for a fixed monthly coding plan with no surprise charges.