---
title: "Claude Code managed-settings.json: Admin guide & security"
description: "Learn how to configure Claude Code managed-settings.json for organizational policy. Follow our guide for safe deployment, security controls, and testing."
---

# Claude Code managed-settings.json: Admin guide & security

Published: 2026-09-30T03:18:46.575Z

Author: [Goon Nguyen](/author/goon)

Reading time: 15 minutes

Learn how to configure Claude Code managed-settings.json for organizational policy. Follow our guide for safe deployment, security controls, and testing.

# Claude Code `managed-settings.json`: Configuration, aecurity and safe rollout

Individual developer preferences are not a substitute for organization-managed policy. Claude Code `managed-settings.json` gives administrators a separate configuration layer for controls that ordinary user and project settings should not weaken. This guide covers delivery choices, file locations, a minimal configuration, security controls, verification, and recovery. Treat Claude Code security policy as one governance layer, not a complete security boundary.

![Image](https://cdn.agentkit.best/blog/cfai-media/7a81410a081ebbb14412bdc805ad6696ef4c905c093ebd9f9ea604349911a6f6-dd8e61460e2aa226c62ea8bbae5faa8eb1de4f1ed98bd6bd6b871fb2e54ccc5b.jpg)

> **Direct answer:** `managed-settings.json` is an administrator-owned file for organization-level Claude Code configuration. It takes precedence over ordinary user and project settings for supported controls. Its protection depends on correct deployment, supported configuration, and appropriate endpoint permissions—not simply the presence of the file.

## What is Claude Code `managed-settings.json`?

`managed-settings.json` belongs to Claude Code’s administrator-managed configuration layer. It defines supported settings and restrictions that take precedence over ordinary developer configuration. Administrators use it to establish consistent tool permissions and related controls across installations. It reduces configuration drift, but its effectiveness still depends on delivery, client behavior, and endpoint security.

### `managed-settings.json` vs. `settings.json`

This comparison covers only the listed file-based sources, not the complete settings hierarchy. It does not establish precedence between multiple managed delivery mechanisms.

> ***Illustrative scenario****: A B2B software team shares repository settings, but developers maintain different personal permissions. An administrator-managed baseline establishes common restrictions without requiring identical personal preferences.*

Policy precedence is not OS-level tamper resistance. Ordinary configuration cannot override an applicable managed restriction. Someone with sufficient operating-system privileges may still modify the file, client, or execution environment.

### What managed settings can control

Anthropic’s [Claude Code](https://agentkit.best/blog/claude-code-guides/what-is-claude-code-a-complete-guide-to-the-ai-coding-tool) Settings documentation describes controls covering:

Availability and delivery support can change by release. A key supported in ordinary settings is not automatically suitable for every managed channel.

## Choose between endpoint-managed and server-managed settings

Choose delivery according to device ownership, supported authentication, and administrative responsibility—not convenience alone. Policy authoring defines the controls; policy delivery gets those controls to the client.

Endpoint-managed settings arrive through administrator-controlled files or supported operating-system management mechanisms. Mobile Device Management (MDM) centrally distributes device configuration and restrictions. Not every endpoint mechanism uses the same JSON file.

Server-managed settings distribute policy through a supported organization administration service. They require compatible accounts, client versions, and authentication. Remote delivery does not move command execution off the workstation.

### Server-managed vs. endpoint-managed comparison

Consult Anthropic’s Server-managed Settings documentation for current eligibility and the applicable administration surface. Do not treat Claude organization administration and API Console administration as interchangeable.

This guide intentionally omits an unverified navigation path, refresh interval, and cached-policy guarantee. Confirm those details before designing availability or recovery procedures. Similarly, do not assume policies from multiple managed sources merge together.

### Recommended decision rule

Hypothetically, a managed B2B SaaS engineering fleet may reuse its endpoint deployment system. A distributed product team may prefer server-managed settings when eligible. Neither choice independently establishes device trust.

Document who publishes policy, who approves changes, and who restores service. File protection and client runtime enforcement require separate evidence.

![Image](https://cdn.agentkit.best/blog/cfai-media/778d3ee4a054a888b915f6eebba3108d2851b8ce2166b8494e45dfd9380c1af4-4c7232779782a1b19b26b25ba3a84369ee5e7a97068eb839f11dfab3606879b6.jpg)

## Locate and create `managed-settings.json`

The managed file belongs in a system-level location, not inside an ordinary repository configuration directory. Correct placement, readable content, and administrator-controlled modification are separate deployment requirements.

### Platform-specific file locations

Anthropic’s Claude Code Settings documentation identifies these file-based locations:

For WSL or containers, identify where the client actually runs. Do not assume a Windows host file configures a separate Linux environment.

Create missing parent directories through approved administration tooling. Permit the client to read the file while restricting modification to authorized administrators. Check parent-directory permissions as well as file permissions.

The Claude Code managed settings location is only one diagnostic input. A correctly named file in the correct directory does not prove its controls were accepted.

### Minimal valid configuration

The following documentation-based illustration uses the documented `permissions.deny` structure. It is not a runtime-validated production baseline. Start in an isolated repository with a dummy `.env` file:

`{
  "permissions": {
    "deny": \[
      "Read(./.env)"
    \]
  }
}
`

The intended restriction targets `.env` through the `Read` tool. Relative permission paths are interpreted against the applicable working directory; test launch-directory and additional-directory behavior explicitly.

A `Read` restriction does not prove equivalent protection through shell commands, integrations, or external tools. Adapt and test the example before rollout. Credentials never belong in this file.

Keep stricter controls separate during initial testing. Managed-only permission rules can exclude developer-defined permissions and disrupt legitimate workflows. Confirm the current scope of `allowManagedPermissionRulesOnly` before enabling it.

Likewise, bypass-mode restrictions require the documented `disableBypassPermissionsMode` placement and accepted value. Do not substitute an assumed Boolean or top-level key.

### Validate the JSON before deployment

Syntax validation only, with Python installed:

`python -m json.tool candidate-managed-settings.json
`

JSON validation does not verify supported settings or runtime enforcement. It would also accept syntactically correct but unsupported keys.

![Image](https://cdn.agentkit.best/blog/cfai-media/1f5a4a071ebcabebb46d2e68f8f89ee935bd0f90a93066b2931af8e73f683c0e-6f9a33a8ce5dd26b4fe28819b155797bfac949d448c4a999223b3dabe2be0b6c.jpg)

## Build a practical Claude Code security baseline

Build the baseline around specific risks and necessary workflows:

This is a design framework, not permission syntax. Anthropic’s Permissions documentation describes deny rules taking priority over ask and allow rules; confirm matching behavior in the deployed version.

![Image](https://cdn.agentkit.best/blog/cfai-media/cdf8d78f0f4439919bda585c0c843e18f3e4902408c0040b23598519728cf6ec-4236fa2637264a70b6039277cbb0d25b0034c80cb63ec673b2f5963f65a8d78b.jpg)

### Protect secrets and sensitive files

Protect sensitive locations without assuming a single pattern covers every access path.

Create dummy files containing only markers such as `DUMMY\_SECRET=not-a-credential`. Test each intended path independently.

A possible overblocking case is `.env.example` matching an overly broad restriction. Because deny rules take priority, adding an allow rule is not a reliable exception strategy. Narrow the restriction or separate harmless templates.

These are candidate designs, not observed test results. File restrictions supplement [secrets](https://agentkit.best/blog/claude-code-guides/claude-code-secrets-how-to-secure-env-files-and-credentials) management and operating-system access controls.

### Restrict dangerous or high-impact shell commands

Evaluate commands by arguments, destination, and context-not executable name alone.

A permission deny list can block documented command matches. It is not comprehensive command injection prevention: Interpreters, scripts, alternate utilities, and shell composition require broader controls.

Use harmless local scripts to test allow, ask, and deny behavior. Never test against production deployments or live data-transfer destinations.

Confirmation means the session user approves an operation. It does not necessarily represent independent security-team approval. Enforce deployment approval separately through repository and release controls.

### Govern hooks without treating all hooks as malicious

Hooks legitimately support formatting, validation, and auditing. Their risk comes from executing commands with the client’s available privileges.

Assign ownership to security hooks and other automation. Review commands, inputs, dependencies, and changes before deployment. Test whether hook failures block expected development tasks.

Anthropic’s Settings and Hooks documentation describes controls including `disableAllHooks` and `allowManagedHooksOnly`. Check current semantics and delivery support before adoption; they are not interchangeable.

Disabling hooks may remove useful safeguards as well as risky automation. Restricting hook sources requires a maintained administrative alternative. Do not assume every hook execution produces an approval dialog.

### Control MCP server access

Model Context Protocol (MCP) connects Claude Code with tools and external systems. [MCP server](https://agentkit.best/blog/claude-code-guides/how-to-setup-and-configure-mcp-servers-in-claude-code) allowlisting should approve both the connection and its business purpose. For each server, record:

Anthropic’s MCP documentation describes `allowedMcpServers` and `deniedMcpServers`. Use its current object structures and matching rules rather than assuming arrays of plain names.

Restricting permissible servers is different from provisioning server definitions. Where supported, `managed-mcp.json` serves a separate configuration purpose; verify its delivery requirements.

An approved server can still expose inappropriate operations. Test tool-level [permissions](https://agentkit.best/blog/claude-code-guides/claude-code-permissions-master-secure-configuration-modes) and server-side authorization. Blocking a required server can interrupt workflows, so provide an approved alternative where necessary.

### Handle authentication and environment settings carefully

Use authentication controls only within their documented scope. OAuth is a delegated authorization mechanism, not evidence that a device is trustworthy.

Role-based access control (RBAC) assigns administrative rights by role; it is not inherently a JSON setting.

> ***Operational recommendation:**** Address unnecessary blocking promptly. Excessive restrictions create pressure to abandon approved workflows, without necessarily improving protection.*

## Deploy, verify and roll out the policy

Managed settings deployment, policy inspection, and behavior testing prove different things. A file-delivery success message proves neither acceptance nor enforcement.

Anthropic’s CLI documentation describes `claude doctor` as an installation and health diagnostic. Do not interpret a successful result as policy verification.

The interactive `/permissions` command helps inspect permission configuration. Treat displayed information as inspection evidence, not proof that every rule matches the intended action. Avoid assuming a specific managed-policy diagnostic display exists in every version.

### Recommended pilot rollout

Select representative environments rather than an arbitrary pilot size:

Assign a policy owner, a pilot reviewer, an escalation contact, and a rollout approver. Define who can authorize exceptions and how those exceptions expire.

### Verification checklist

Use dummy data in an isolated repository. The matrix below defines expected results; it does not report observed outcomes.

Confirm that a tool call was actually attempted. A model refusing a request without invoking a tool does not demonstrate permission enforcement.

Record the Claude Code version, operating system, delivery method, authentication context, policy revision, test date, and observed outcome. Keep untested rows explicitly marked. An unexplained result should stop expansion until resolved.

### Policy change management

**Apply policy-as-code**: Maintain configuration through a controlled, reviewable change process.

![Image](https://cdn.agentkit.best/blog/cfai-media/d26bf91d19f22b7b50fb6267b4d1d88ec44e9eff13eaec8cc77b5bb094e7bd94-86eeb7eec6ac6f72d38afcbcf98408cd625e1856dd306b3528137834af57f4cd.jpg)

## Troubleshooting, rollback and security limitations

Start Claude Code troubleshooting by separating delivery failure from invalid configuration and unexpected rule behavior. These require different corrections.

### Common problems and fixes

These are hypotheses, not diagnoses. Do not indiscriminately disable controls or open network access. Malformed JSON is a syntax problem. An accepted JSON object with an unsupported key is a semantics problem. Neither justifies assuming universal fail-open, fail-closed, or partial-enforcement behavior.

![Image](https://cdn.agentkit.best/blog/cfai-media/8a79d7427cff33eeacbef6a6fd52cb84efb7286b3e00d8f0148eafc02e6551cf-91a82ac150e03cc0139bd574e6665e4b51fe9abc7ed7741dab4fb3add2a9c4aa.jpg)

### Safe rollback procedure

Policy rollback must restore the authoritative delivery source, not merely a convenient local copy.

Restoring a local file may not change an active remotely delivered policy. Confirm which source governs the affected installation. Deleting all managed settings is not a safe default recovery strategy.

### What `managed-settings.json` cannot protect

Managed settings govern supported Claude Code client behavior; they are not a complete sandbox or universal data-loss prevention system. Their effectiveness depends on the client, delivery protections, endpoint ownership, and user privileges. A restricted tool action does not establish that every alternate path to the same data or operation is blocked.

Use defense in depth:

A user controlling the endpoint or an alternate execution environment presents a different risk from someone attempting an ordinary settings override.

## Frequently asked questions

### What is the `managed-settings.json` file in Claude Code?

`managed-settings.json` is an administrator-owned file defining organization-level Claude Code policy. For supported controls it takes precedence over user and project settings. That precedence is a policy property, not tamper resistance — someone with sufficient OS privileges can still modify the file, client, or execution environment.

### How does `managed-settings.json` differ from standard `settings.json`?

Ordinary `settings.json` files hold developer and repository configuration; the managed file sits in a separate administrator-owned layer that ordinary settings cannot weaken. This covers file-based sources only — it does not establish precedence against every configuration input, or between multiple managed delivery mechanisms.

### Where should I place the `managed-settings.json` file?

The file location depends on the host operating system. Use `/Library/Application Support/ClaudeCode/managed-settings.json` on macOS, `/etc/claude-code/managed-settings.json` on Linux or WSL, and `C:\\Program Files\\ClaudeCode\\managed-settings.json` on Windows. For remote environments, you can alternatively manage policies directly through the Anthropic administration console.

### Can I deliver managed settings without touching endpoint files?

Where eligible, server-managed settings deliver policy to an authenticated client without per-machine files. Confirm refresh behavior and cached-policy handling before relying on it for recovery. Remote delivery keeps execution on the workstation and does not establish device trust.

### Does `managed-settings.json` provide absolute security?

No. While it serves as a critical client-side policy enforcement tool for identity, tool access, and command restrictions, it is not a complete security boundary. It should be used as part of a defense-in-depth strategy that includes OS-level least privilege, endpoint management, and robust repository-level secret protection.

### How can I verify that my managed settings are active?

Inspect permission configuration with `/permissions`, then run the allow, ask, and deny tests from the verification checklist using dummy data in an isolated repository. Record version, OS, delivery method, and outcome. `claude doctor` is an installation diagnostic — a successful result is not policy verification.

### What should I do if a managed policy blocks a necessary workflow?

Identify the matching rule with harmless fixtures first. If it is over-broad, narrow the rule or separate the harmless case — an allow entry does not override a matching deny rule. Redeploy through the authoritative source, reload, then repeat both positive and negative tests.

**Read more**:

## Conclusion

Deploying `managed-settings.json` in Claude Code requires clear policy ownership, secure delivery, and strict verification. Start with a minimal, documented configuration in an isolated pilot repository, testing allowed, confirmation-required, and denied behavior before expanding access.

Because a valid syntax check does not guarantee runtime security, separate configuration inspection from actual execution evidence, maintain a known-good backup revision, and retest after upgrades to balance protection with developer productivity.
