[BUG] Error Code 400 - No Claude Code Login possible via Company SSO
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
<img width="1558" height="1390" alt="Image" src="https://github.com/user-attachments/assets/364599f2-211b-482b-a718-0fee7250e4b8" />
What's Wrong?
Cannot log in to Claude Code on an active Claude Enterprise plan. Two distinct
failures depending on the login method:
- Magic link: infinite authorization loop. Clicking the link prompts to
authorize access, then returns to the login screen asking to log in again,
which sends another magic link, which loops back to authorize, and so on.
A session is never established.
- Verification code: entering the code fails immediately with
Request failed with status code 400 (see screenshot).
The same Enterprise account authenticates without issue in the Claude desktop
app, which confirms the account, email mapping, and subscription are valid.
The failure is specific to Claude Code login.
Steps to Reproduce
- Run
claudeand select "Claude.ai Subscription" - Choose magic link: click the emailed link, authorize, get bounced back to
the login screen, repeat indefinitely
- Alternatively choose verification code: enter the emailed code, receive
Request failed with status code 400
Expected Behavior
Login completes and an authenticated Claude Code session starts, as it does in
the desktop app with the same account.
Troubleshooting Already Attempted (none resolved the issue)
- Logged out and back in
- Confirmed Claude Code is on the latest version (2.1.211)
- Cleared cached credentials:
security delete-generic-password -s "claude-code"
and rm -f ~/.claude/.credentials.json
- Verified no interfering env vars:
ANTHROPIC_API_KEYand
ANTHROPIC_AUTH_TOKEN are both confirmed unset
- Requested and clicked the magic link on the same device
- Checked the Anthropic status page (no relevant incident shown)
Notes
Desktop app works with the same account, so this appears to be server-side or
Enterprise org-side rather than a local client issue. Contacted support via
Fin, which did not escalate, refused to connect me to a human and directed me here.
Environment
- Claude Code version: 2.1.211
- Platform: macOS 26.5.1 (build 25F80)
- Node.js: v25.2.1
- npm: 11.6.2
- Install method: native installer (~/.local/share/claude/versions/, symlinked from ~/.local/bin/claude — not npm, not Homebrew)
- Architecture: arm64 (Apple Silicon)
- Terminal: Terminal.app (Apple_Terminal)
- Plan: Claude Enterprise
- Login method attempted: Claude.ai Subscription (both magic link and verification code)
- Env vars: ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN both confirmed unset
What Should Happen?
Login completes and an authenticated Claude Code session starts, as it does in
the desktop app with the same account.
Error Messages/Logs
Request failed with status code 400
Steps to Reproduce
- Run
claudeand select "Claude.ai Subscription" - Choose magic link: click the emailed link, authorize, get bounced back to
the login screen, repeat indefinitely
- Alternatively choose verification code: enter the emailed code, receive
Request failed with status code 400
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.211
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗