Use Copilot Code (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.

Copilot Code builds working software from your description. This article covers the main tasks: describing what to build, previewing and iterating on the result, working with your files and data, running locally or in the cloud, automating work, and sharing what you build.

To create and open your first project, see Get started with Copilot Code. This article assumes you have a project open in the Code tab.

Describe what you want to build

Code turns a plain-language description into working software. Describe the outcome you want and who it's for, rather than the code. You can build:

  • Apps and interactive tools, such as trackers, forms, and calculators.
  • Dashboards and data views.
  • Static websites and landing pages.
  • Data transforms, scripts, and automations.
  • Internal tools.

The following examples show the kind of prompt that works well.

Goal Example prompt
A dashboard Build a dashboard that tracks weekly signups by channel.
A tracker app Build a task tracker with an Add task button and a list of tasks.
A landing page Create a landing page for a product launch with a signup form.

When Copilot Code needs more detail, it asks clarifying questions before it builds. Answer them to guide the result.

Tip

Start simple. Describe the core of what you want first, then add features as you go.

Bring in your files and data

Copilot Code can work from files and data you provide.

  • Upload or drag and drop files: Add CSV files, spreadsheets, images, documents, PDFs, and presentations for Copilot Code to work with.
  • Paste text: Paste data directly into the conversation.
  • Open a local folder (local projects): Point Copilot Code at an existing folder on your device. Copilot Code can read the files there to work with them.
  • Use your work context: With your permission, Copilot Code uses your Microsoft 365 data—documents, emails, meetings, and calendar—as context. You can ask for it in plain language, such as Use my current project list to fill in the dashboard, or attach work context from the composer.

Preview and interact with the canvas

The canvas next to your conversation is where you see and interact with what Copilot Code builds.

  • Preview: See the rendered result—a static website or a web app—update as Copilot Code works.
  • Code view: Switch to the raw code to see and edit (local only) the generated files.
  • Select on the canvas: Select an element in the preview to point Copilot Code at it, then describe the change you want.

Note

Preview support depends on the type of artifact and your device. Some artifacts can't be previewed on every platform.

Iterate and revert

Building is a conversation. You refine the result over multiple turns.

  • Refine: Describe a change, such as adding a feature, adjusting the layout, or fixing a problem, and Copilot Code updates the project. Copilot Code keeps the context of your session, so later requests build on earlier ones.
  • Revert: Ask Copilot Code to go back to an earlier version if you want to undo a direction.
  • Recover from errors: If something fails, Copilot Code tries to fix it. If it can't, it explains what happened in plain language and offers to try again.

Tip

Make one focused change at a time. It's easier to see the effect of each change and to steer the result.

Build and publish apps to Copilot Managed Runtime

Copilot Code can build lightweight, interactive apps—trackers, kanban boards, forms, calculators, dashboards, and planners that people select, type into, and update over time. You describe the app you want, Copilot Code builds it with a live preview, and you can publish it and share it with people in your organization. You don't need to know how to code.

  1. Describe the app you want, the problem you want to solve, or the information you want to visualize. You can reference your Microsoft 365 data, such as documents, spreadsheets, meetings, and messages.
  2. Enter your prompt. For example, Build an app to run my daily standup with my team.
  3. Copilot Code builds the app and shows it in a live preview. For an app that uses your real data, Copilot Code may ask permision to use the data source before it builds. For a self-contained app, such as a tracker or a calculator, it builds right away.

Important

Building and publishing apps to Copilot Managed Runtime is a preview feature provided under Microsoft Product Terms. Preview features might have restricted functionality and might change before general availability. You need to be part of the Frontier preview program to get early access.

Learn more about building and publishing apps in What is Copilot Managed Runtime.

Refine your app

Ask Code to add or change features, such as showing participant information as cards. The app updates as you go. This is the same conversation loop described in Iterate and revert.

Open your app

Open your app to test how it works and use it the way the people you share it with will. For more information about viewing all of the apps you create, see One place to find and run your apps.

Publish your app

Your app saves automatically as you work. Building doesn't publish it—publishing is a separate step that happens only when you ask for it. When you're ready, ask Code to publish the app, for example Publish it or Make it live. Publishing makes your app, and your latest changes, available as a live version to the people you share it with.

Share your app

After you publish, share your app with a link, the way you share a document. Ask Code to share it with specific people or groups in your organization and choose if they can use it. Sharing an app doesn’t share its underlying data. People you share with see only the data they already have permission to access in connected sources, such as a SharePoint list, and might be asked to approve a connection the first time they open the app.

Run locally or in the cloud

You can run a project on your own device or in the cloud.

  • Local: Copilot Code works inside the project folders on your device, either the default location or a folder you choose. It can read the files there, install what the project needs, and run the app so the preview stays current. Copilot Code asks for your approval before it reaches outside that folder or makes a network connection.
  • Cloud: Copilot Code runs and keeps your project in a secure, isolated environment in the cloud, so you can work with it across devices.

For a comparison, see Build locally or in the cloud.

Extend Code with plugins and tools

Code uses the same plugins available in Cowork, plus built-in tools.

  • Plugins: Connect external data sources and services through plugins from the Microsoft 365 App Store. For how plugins work, see Use plugins with Cowork.
  • Tools: Code can use tools such as web search and image generation while it builds, subject to your organization's policies.

Work with GitHub

Connect your GitHub account to work with repositories, ask questions about your code, and open pull requests. GitHub connectivity is optional—you don't need it to build, preview, and save projects. For the full workflow, see Work with GitHub in Copilot Code.

Share and delete

  • Share: Share a static app as a link that's scoped to your organization. People in your organization can open the link.
  • Delete: Ask Copilot Code to delete an artifact it created.

Stay in control

Copilot Code asks for your permission before it takes actions that reach beyond the project folder you selected, such as accessing other locations, making network connections, or running commands. Consent prompts describe what's happening in plain language.

By default, Copilot Code asks for permission to:

  • Make network calls, including accessing the internet.
  • Use extensions and MCP.
  • Run shell or terminal commands.
  • Read or write files outside the projects and folders already in use in Copilot Code.

Copilot Code allows reading and writing files in projects and folders that are already in use without asking for permission. For example, if you start a new project in an existing folder, all Copilot Code projects can read from and write to that folder without additional permission.

Important

When you enable Always allow, it remains enabled until you disable it. Always allow applies to existing sessions and workspaces as well as any new sessions started after you enable it. Use caution when enabling Always allow.