Auth Settings
These keys control sign-in rules and credential helpers. A helper is a script of your own that prints a token or a header. Claude Code runs the helper when it needs a fresh value.
The helper keys point at your own command. The forceLogin* keys restrict sign-in methods.
Keys
Source: Settings Reference for rows marked
| Key | Status | Type | Default | What It Does | Where to Set It |
|---|---|---|---|---|---|
allowed | Documented: An official docs page names this item. Managed Only: Works only in managed (organization policy) settings. | array of: anthropic, custom, bedrock, vertex, foundry, anthropic, mantle, gateway | - | Limit which API providers a machine may use. This key works in managed settings only. Claude Code removes unknown entries. An empty list admits nothing. Claude Code refuses a session on an unlisted provider at startup, at login, and on the next API call. Claude Code admits custom (any other base URL) only for a value pinned in the env block of the same managed source. Source: the program. | Managed settings only |
api | Documented: An official docs page names this item. | string | - | Generate the API credential with your own command. | Any settings file |
aws | Documented: An official docs page names this item. | string | - | Refresh expired Bedrock credentials in . with your own command. | Any settings file |
aws | Documented: An official docs page names this item. | string | - | Supply Bedrock credentials as JSON from your own command. | Any settings file |
force | Documented: An official docs page names this item. | string | - | Set the gateway URL the login screen connects to. Pairs with force. Claude Code ignores it in project, local, flag, and server-managed settings. | User or managed settings |
force | Documented: An official docs page names this item. | enum: claudeai, console, gateway | - | Restrict login to claude.ai, Claude Console, or a cloud gateway. | Any settings file |
force | Documented: An official docs page names this item. | array or string | - | Pin claude.ai logins to your organization. It takes one UUID or an array. In managed settings, login fails for any other account. | Any settings file |
gateway | Documented: An official docs page names this item. Managed Only: Works only in managed (organization policy) settings. | array of string | - | Let / reach a cloud gateway on public IPv4 space your organization uses internally. It allows up to 4 IPv4 blocks, each / to /. | Managed settings only |
gcp | Documented: An official docs page names this item. | string | - | Refresh Google Cloud credentials with your own command. | Any settings file |
otel | Documented: An official docs page names this item. | string | - | Generate rotating OpenTelemetry headers with your own command. | Any settings file |
proxy | Documented: An official docs page names this item. | string | - | Run your own command that prints a Proxy- header value. Claude Code reads it from the highest-priority source only. | Settings files |
xaa | Undocumented: Only the program shows this item. It can change without notice. | object | - | Set the XAA (SEP-990) identity provider once. Every XAA-enabled MCP server reuses it. claude mcp xaa setup writes it as an object { issuer, client. | User settings |
Example
Get the API Key from a Script
The first key runs ~/bin/get-key.sh to get the API key. The second limits sign-in to Claude Console.
{
"$schema": "https://clawdipedia.cc/schemas/claude-code-settings.json",
"apiKeyHelper": "~/bin/get-key.sh",
"forceLoginMethod": "console"
}
Errors
Each row is a family of messages. The backticked text is the start that every message in the family shares. A row marked Various gathers the messages of one feature that do not share one start.
| Start of Message | Status | What It Means | Cases |
|---|---|---|---|
| Various | Undocumented: Only the program shows this item. It can change without notice. | Login and accounts. Claude Code refused a sign-in, sign-out, token, or profile step. | You gave both -- and --. The policy does not permit setup-. An API key or provider setting takes precedence over a profile. A workload identity federation machine signs in on its own. A profile name or config file is not valid. The code is not valid. An account call such as the org UUID or an API key creation failed. |
| Various | Undocumented: Only the program shows this item. It can change without notice. | Grove settings. A Grove setting or notice could not be read or changed. | The request failed or the answer has no grove_ value. |
| Various | Undocumented: Only the program shows this item. It can change without notice. | Billing and usage requests. A billing, usage, or metrics request failed. | The text names the request (for example prepaid/, payment_, auto_, metrics_) and says it is unavailable, with the reason. |
| Various | Undocumented: Only the program shows this item. It can change without notice. | Provider and model setup. A provider or model setting is not valid. | A project or region value has characters that the request path does not allow. A Foundry resource name is not valid. A model catalog entry or alias is not valid. A fallback model cannot be used. |
Claude Apps Gateway Server Key
The key oidc.user_id_claim belongs to the server configuration of the Claude apps gateway, not to a Claude Code settings file.
No file under schemas/ holds it, so its status is unconfirmed. The program defines it as an optional non-empty string.
| Key | Status | What it does | Notes |
|---|---|---|---|
oidc. | Undocumented: Only the program shows this item. It can change without notice. | Names the id_ claim that identifies a person. Default sub. | New in 2.. The token must still carry a non-empty sub. If the named claim is not a non-empty string, sign-in fails with USER_ and the message says to check oidc.. Source: chunk- lines 57717, 61506, and 61545. |
Related Pages
- Settings Files and Scopes explains the scopes, precedence, and managed settings.
- Settings Reference is the official page for each key.
- Authentication explains the login methods in the official docs.
- Auth and Account Variables lists the auth environment variables.
- Cloud Provider Variables covers Bedrock, Vertex, and Foundry.