Manage Copilot Code for your organization (Frontier)

Important

  • This is a preview feature provided under Microsoft Product Terms.
  • Preview features may have restricted functionality and may not be released for general availability. These features are available before an official release so that customers can get early access and provide feedback.
  • You need to be part of the Frontier preview program to get early access. Frontier connects you directly with Microsoft's latest AI innovations. Frontier previews are subject to the existing preview terms of your customer agreements. As these features are still in development, their availability and capabilities may change over time.

The Code tab in Microsoft Copilot lets people in your organization build working software from a plain-language description, on their own device or in the cloud. This article describes the controls you use to govern how it's used, audit its actions, and manage spend.

Copilot Code works within your Microsoft 365 environment and is compatible with your existing enterprise governance. Copilot Code is a usage-based billing feature and requires a spending policy to be configured.

Configure your network to connect to Copilot Code

  1. Add Copilot Code to the Copilot allow list.
  2. Make Microsoft 365 services reachable to Copilot.

Control which features are available

Beyond turning Copilot Code on or off, you can enable or disable specific Copilot Code features—for example, which modes are available to users. Policy is enforced at the organization level, so your settings apply consistently across your users.

These controls apply to Copilot Code in the desktop app, on the web, and in the Microsoft Copilot mobile app. You don't configure mobile access separately. Users who can use Copilot Code on their computer can also use it on iOS, iPadOS, and Android devices for cloud sessions. For more information, see Use Copilot Code on your mobile device.

Control Default state What it does
Pre-install Copilot Code components Off This policy setting controls whether Copilot Code client components (web components, local runtime, etc.) are installed when the Copilot app starts.
Auto-approve setting On This policy setting controls whether users can let Copilot auto-approve permissions in Copilot Code instead of confirming each action.
Copilot Code execution location On (cloud only) This policy setting controls where Copilot Code can run agent sessions: on the user's device, in the cloud, or both. Admins can restrict this to manage cost or data residency, On if the admin has configured billing for Copilot Code.
GitHub connection Off This policy setting controls whether users can connect a GitHub account in Copilot Code.
Allowed Github Connections list Both This policy setting controls which GitHub services users can connect to from Copilot Code of the Microsoft 365 Copilot app. It controls both the GitHub connection types that users can select and the specific GitHub domains that the app is allowed to contact. (Both, GitHub.com only, GitHub Enterprise only, None).
Organizational Data in Copilot Code On for cloud; Off for local This policy setting controls whether Copilot Code can use Microsoft Graph / WorkIQ data (teams, documents, emails, calendar) and plugins as context for building artifacts.

Manage GitHub connections

Users can optionally connect a GitHub account to work with repositories. As an admin, you can:

  • Restrict connections to GitHub accounts associated with your tenant.

Control filesystem, network, and command access

Copilot Code asks for your consent before it takes actions that reach beyond the project folder you selected. You can set granular controls for these capabilities at the organization level:

  • Filesystem access: Access to locations outside the selected project folder.
  • Network access: Outbound network connections made by Copilot Code or by code it runs.
  • Command execution: Commands that Copilot Code runs on your behalf.

Device policy

Administrators manage the sandbox and preinstall it as a device policy.

To configure the Copilot device policy on a Windows computer, follow these steps:

  1. Download the Microsoft Copilot policy templates, then import the policy file (windows/admx/copilotapp.admx). For more information about importing the policy file, see Import custom ADMX and ADML administrative templates into Microsoft Intune.
  2. Configure the policies - Policy location: Microsoft Copilot > Code Tab.

To configure the Copilot policy on macOS, configure the policies based on the following definition - Domain: com.microsoft.Copilot.

Configure sandbox policies

Policy name Description Value definitions Default macOS
Copilot sandbox required This policy setting specifies whether the sandbox is required for local Copilot sessions.

If enabled, the sandbox is always on and users can't turn it off. File access is limited to the workspace, with read access to required program files and read/write access to temporary files. Network access depends on the "Copilot sandbox outbound network access" policy.

If disabled, the sandbox is still on by default, but users can turn it off. Local Copilot sessions run without these restrictions only if the user turns the sandbox off.

If you don't configure this policy, the sandbox is required and users can't turn it off. For more information, see Sandbox in Copilot Code.

This policy doesn't affect Copilot Code Cloud agent sessions.
Enabled / 1 or not configured: the sandbox is always on and users can't turn it off.

Disabled / 0: the sandbox is on by default, but users can turn it off.
1 (enabled) CopilotDeviceCodeTabSandboxEnabled
Copilot sandbox outbound network access This policy setting specifies how sandboxed local Copilot sessions make outbound network connections.

If outbound network access is enabled, the access mode determines which connections are allowed. Full access allows all connections. Allow list only allows connections only to the hostnames you configure, separated by semicolons (for example, example.com;api.contoso.com). Wildcards are supported. Disabled blocks all connections. The allowed hostnames apply only when the mode is Allow list only.

Users can change the access mode and the allowed hostnames only when the mode is Full access. In all other modes, users can't change them.

In Allow list only mode, connections required by features allowed by policy, such as Work IQ and plugins, are automatically allowed. All other connections are limited to the hostnames you configured. For hostnames typically required for agent operation, see Secure local execution. Use it as a reference for your environment, for example by adding an internal package registry or omitting hosts you don't need.

If outbound network access is disabled, all outbound connections are blocked. If you don't configure this policy, outbound network access is enabled in Allow list only mode.

This policy doesn't affect Copilot Code Cloud agent sessions.
0 = disabled.

1 = enabled.

Absent = enabled

Any other values = disabled.
1 (enabled) CopilotDeviceCodeTabOutboundNetworkAccessEnabled
Copilot sandbox outbound network access mode This policy setting is part of the "Copilot sandbox outbound network access" configuration. See the description of that policy for details. 0: Disabled; block all connections.

1: Full access; allow all connections and user editing.

2, absent, or unsupported: Allow list only.
2 (allow list only) CopilotDeviceCodeTabOutboundNetworkAccessMode
Outbound network allowed hosts This policy setting is part of the "Copilot sandbox outbound network access" configuration. See the description of that policy for details. String: Semicolon-delimited hostnames; leading wildcards are supported.

Empty or absent: Only connections required by policy-enabled features are automatically allowed.
Empty CopilotDeviceCodeTabOutboundNetworkAllowedHosts

Keep these behaviors in mind:

  • No user bypass: When you require the sandbox, users can't turn it off or approve an action that runs outside it. To exempt specific users, add them to the policy exemption group.
  • Fails closed: If the sandbox can't be established, Copilot Code doesn't start or doesn't run the affected command. It never runs the work without protection. On managed devices with no policy set, the sandbox stays on, with outbound access set to approved hosts only.
  • User-launched apps aren't covered: If a user runs an app that Copilot Code built outside of a Copilot Code session, the sandbox doesn't restrict it.
  • Supported platforms: The sandbox works on Windows 11, version 24H2 or later, and on Mac. Windows 10 isn't supported. Users on unsupported devices can run projects in the cloud.

For details, see Sandbox in Copilot Code.

Windows requirements for agent-run Git commands

Git commands that the agent runs in sandbox require the latest Copilot app and one of the following Windows versions:

Windows version Minimum required update / OS build
Windows 11, version 24H2 KB5124010 - build 26100.9550, or later
Windows 11, version 25H2 KB5124010 - build 26200.9550, or later
Windows 11, version 26H2 KB5124010 - build 26300.9550, or later
Windows 11, version 26H1 KB5124006 - build 28000.3086, or later

Configure preinstall policy

Use this policy to specify when Copilot Code components are downloaded.

Policy name Description Value definitions Default macOS
Preinstall Copilot Code components This policy setting specifies whether the Code Tab UX web components, the local runtime, and the coding-session components download silently when Microsoft Copilot starts. This setting reduces the first-use wait when a user opens Code Tab. Enabled / 1: Install when Copilot starts.

Disabled / 0 or not configured: Install when Copilot Code is first opened.
0 (disabled) CopilotDeviceCodeTabPreInstallEnabled

Audit what Copilot Code does

Copilot Code logs the actions it takes so you can review them. IT administrators can access audit logs that include:

  • Copilot Code that was generated.
  • Commands that were run.
  • Files that were read or written.

The logs provide traceability from a user's request to the action Copilot Code took and its outcome.

Manage identity and billing

Copilot Code uses your organization's Microsoft Copilot identity and billing.

  • Identity: A Microsoft Entra (work) account is the default and only required sign-in. Linking a GitHub account is optional.
  • Licensing: Microsoft Copilot license controls Copilot Code availability.
  • Spend limits: Copilot Code is a usage-based billing feature and requires a spending policy to be configured. Admins can configure the spending policy to set per-user spend limits and manage who has access to Copilot Code. Copilot Code honors the usage and budget limits you set. Usage counts against your Microsoft Copilot entitlement, and users can see their consumption against that entitlement.

Compliance and manageability

Copilot Code is built for enterprise use from day one:

  • It's compatible with your existing Microsoft 365 enterprise governance.
  • Copilot Code runs with configurable isolation and enforcement levels for code execution.