{"version":"2.1.324","anchor":"federation-rule-id-added-to-the-credential-env-var-list","canonical_anchor":"federation-rule-id-added-to-the-credential-env-var-list","heading":"More credential sources recognised, with clearer sign-in error hints","tier":"notice","area":"Auth","scope":"both","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.324\/e\/federation-rule-id-added-to-the-credential-env-var-list","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.324","markdown":"### More credential sources recognised, with clearer sign-in error hints\n\n`ANTHROPIC_FEDERATION_RULE_ID` and `CLAUDE_CODE_OAUTH_TOKEN` join the recognised credential variables, and auth error hints name the key's source\n\n**What**\n\nClaude Code keeps a list of environment variables (values set in your shell or by the program that starts it) that can supply its sign-in credentials.\n\n- `ANTHROPIC_FEDERATION_RULE_ID` now appears in that list with `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_API_KEY` and `CLAUDE_CODE_OAUTH_TOKEN`. Before, there was only the `env-federation` entry. It is also cleared, along with `ANTHROPIC_API_KEY` and `CLAUDE_CODE_OAUTH_TOKEN`, where Claude Code removes credentials from an environment. The Workload Identity Federation token exchange skips its error reporting for one kind of error.\n\n- `CLAUDE_CODE_OAUTH_TOKEN` is now registered as its own source, `env-setup`, so it is recognised as a credential from the environment like `ANTHROPIC_API_KEY` and `ANTHROPIC_AUTH_TOKEN`. Before, only `env-key`, `env-token` and `env-federation` existed.\n\n- The hint added to sign-in errors now tells apart a key passed in by the program that started the session from a key in `ANTHROPIC_API_KEY`, and suggests `claude auth login` when a sign-in profile is used. Before, it only said `ANTHROPIC_API_KEY` is set. The `ANTHROPIC_UNIX_SOCKET` check now comes first.\n\n**Why**\n\nIf sign-in fails, the error now points to where the credential actually came from, which helps in embedded or hosted sessions. How these credentials are recognised and reported may also affect which one is used.\n\n- Area: Auth\n- Names: `ANTHROPIC_FEDERATION_RULE_ID`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: yes"}