{"name":"forceLoginMethod","slug":"forceloginmethod","family":"setting","title":"Settings keys","noun":"settings key","description":"[Restrict login](\/docs\/en\/authentication#restrict-login-to-your-organization) to claude.ai, Claude Console, or a [cloud gateway](\/docs\/en\/claude-apps-gateway)","description_source":"docs","described_by":{"doc":"claude-code\/settings-reference","title":"All settings"},"presence":{"first_seen":"2.1.138","removed_in":"2.1.284","in_current_build":false,"newest_mined":"2.1.308","builds":126,"mined_builds":149,"first_cited":{"version":"2.1.212","released_at":"2026-07-16 19:20:24","spans":5}},"aliases":[],"entries":[{"version":"2.1.307","anchor":"launcher-host-sign-in-for-the-desktop-app-is-new-in-this-bui","heading":"Sessions started by the desktop app can use its claude.ai sign-in","line":"Claude Code can now use a claude.ai sign-in passed over by the launcher that started it, such as the desktop app, and drops it when conditions no longer hold","released_at":"2026-10-21 20:47:18","reason":"found in this entry's text"},{"version":"2.1.304","anchor":"login-screen-can-show-a-refusal-notice-or-restrict-to-claude","heading":"Login screen can refuse sign-in or allow only claude.ai login","line":"The login screen can now show a refusal notice instead of the login form, or allow only claude.ai login, and startup can show a blocked screen","released_at":"2026-10-19 19:47:15","reason":"found in this entry's text"},{"version":"2.1.304","anchor":"login-hidden-or-refused-in-cloud-sessions-with-a-console-si","heading":"\/login is hidden in cloud sessions where a claude.ai sign-in can't be used","line":"In a cloud session started with a Console sign-in, or where forceLoginMethod requires another method, \/login is hidden and explains why","released_at":"2026-10-19 19:47:15","reason":"found in this entry's text"},{"version":"2.1.299","anchor":"server-policy-forcelogin-settings-take-precedence-over-serve","heading":"Locally managed login restrictions now take priority over server-managed settings","line":"forceLoginOrgUUID and forceLoginMethod set through MDM or a managed file now apply ahead of server-managed settings","released_at":"2026-10-14 00:23:19","reason":"found in this entry's text"},{"version":"2.1.299","anchor":"stored-remote-settings-copy-must-pass-a-trust-gate-sync-sta","heading":"The saved copy of managed settings is checked before it is used","line":"Claude Code now ignores its saved copy of organization-managed settings unless it matches the account and organization it is pinned to","released_at":"2026-10-14 00:23:19","reason":"found in this entry's text, named in this entry"},{"version":"2.1.296","anchor":"gateway-login-method-now-counts-as-gateway-required","heading":"Setting forceLoginMethod to gateway now leads to the gateway login","line":"With forceLoginMethod set to \"gateway\" and no forceLoginGatewayUrl, Claude Code now treats gateway login as required","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text, named in this entry"},{"version":"2.1.295","anchor":"gatewayurl-setting-now-honoured-from-user-settings-on-unmana","heading":"Gateway URL setting can now come from your own user settings","line":"The gatewayUrl setting is now honoured from your user settings on a machine with no managed settings, not only from admin-managed ones","released_at":"2026-10-08 18:22:58","reason":"found in this entry's text, named in this entry"},{"version":"2.1.284","anchor":"detailed-error-when-managed-login-policy-conflicts-with-an-a","heading":"Clearer error when a managed login policy clashes with your API key or token","line":"When managed settings require a specific sign-in but another credential is set, the error names that credential, where it came from, and how to fix it","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text, named in this entry"},{"version":"2.1.268","anchor":"new-managed-settings-key-gatewayinternalnetworks-joins-highe","heading":"New managed-settings key gatewayInternalNetworks joins highest-source-wins auth pins","line":"New managed setting gatewayInternalNetworks joins the group taken only from the top-priority settings source","released_at":"2026-09-10 18:41:11","reason":"found in this entry's text"},{"version":"2.1.265","anchor":"clearer-managed-settings-gateway-sign-in-error-message","heading":"Clearer managed-settings gateway sign-in error message","line":"Gateway sign-in error now explains itself in plain language instead of naming the internal forceLoginMethod setting","released_at":"2026-09-08 19:05:16","reason":"found in this entry's text"}],"entries_total":17,"docs":[{"source":"claude-code","path":"settings-reference","title":"All settings","documented":true},{"source":"claude-code","path":"settings","title":"Claude Code settings","documented":true},{"source":"claude-code","path":"admin-setup","title":"Set up Claude Code for your organization","documented":false},{"source":"claude-code","path":"authentication","title":"Authentication","documented":false},{"source":"claude-code","path":"changelog","title":"Claude Code changelog","documented":false},{"source":"claude-code","path":"claude-apps-gateway","title":"Claude apps gateway for Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry","documented":false},{"source":"claude-code","path":"claude-apps-gateway-config","title":"Claude apps gateway configuration","documented":false},{"source":"claude-code","path":"claude-apps-gateway-deploy","title":"Claude apps gateway deployment and operations","documented":false},{"source":"claude-code","path":"claude-apps-gateway-on-aws","title":"Deploy Claude apps gateway on AWS","documented":false},{"source":"claude-code","path":"claude-apps-gateway-on-gcp","title":"Deploy Claude apps gateway on Google Cloud","documented":false}],"docs_total":14,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/setting\/forceloginmethod","family_url":"https:\/\/changelogs.core-directive.com\/reference\/setting.json"}