GitHub Copilot Setup Guide for Power Platform
Claude Code builds the whole solution. GitHub Copilot works inside it — completing formulas, rewriting expressions, and explaining code as you read. This guide gets Copilot installed, taught about your Power Platform conventions, and working alongside Claude Code.
In this guide
- GitHub Copilot installed in VS Code and signed in
- The three editor surfaces: inline completions, Copilot Chat, and agent mode
- A
.github/copilot-instructions.mdthat teaches Copilot your Power Platform conventions - The cloud coding agent — assign a GitHub issue, get a PR back
- The Dataverse MCP wired into Copilot Chat so it reads your real schema
- A clear picture of how Copilot and Claude Code divide the work
Before You Start
GitHub Copilot lives inside your editor. This guide assumes VS Code, which is where the Power Platform extensions live too. You'll need:
| Prerequisite | Why | Get it |
|---|---|---|
| Visual Studio Code | The editor Copilot plugs into. Also hosts the Power Platform Tools extension and your pa.yaml / flow JSON / Liquid files. | code.visualstudio.com |
| A GitHub account | Copilot authenticates against it | github.com/signup |
| A Copilot plan | There's a Free tier (limited completions + chats per month), plus Pro and Pro+ for higher limits and more models. | github.com/features/copilot/plans |
| A Power Platform project | A folder with your unpacked solution — pa.yaml, flow JSON, Liquid, TypeScript. Copilot is most useful with real files open. | Use a solution you've exported with PAC CLI |
Availability of paid plans can change — check the plans page for current sign-up status. The Free tier is enough to follow this entire guide.
1. Install GitHub Copilot in VS Code
Open VS Code, then:
- Open the Extensions view — click the squares icon in the Activity Bar, or press
Ctrl+Shift+X(Cmd+Shift+Xon Mac). - Search for GitHub Copilot.
- Click Install on the official GitHub Copilot extension. This also pulls in GitHub Copilot Chat automatically.
Once installed, you'll see a Copilot status icon in the bottom status bar.
2. Sign In
If VS Code doesn't prompt you automatically:
- Click the Accounts icon (bottom-left of the Activity Bar).
- Choose Sign in to use GitHub Copilot.
- A browser tab opens — authorise VS Code against your GitHub account, then return to the editor.
When the Copilot status-bar icon stops showing a "not signed in" state, you're ready.
3. The Three Ways to Use Copilot
Copilot shows up in three modes. You'll use all three across a normal Power Platform session.
Inline completions
As you type, Copilot suggests the rest in grey "ghost text". Press Tab to accept, Esc to dismiss, or Alt+] / Alt+[ to cycle alternatives. This is where Copilot shines in Power Platform files: completing a Power Fx formula inside a .pa.yaml, finishing an OData filter in flow JSON, or filling out a TypeScript hook in a Code App.
Copilot Chat
Open Chat with Ctrl+Alt+I (Ctrl+Cmd+I on Mac), or click the chat icon in the title bar. Ask it to explain or rewrite what's in front of you:
- "Explain what this Power Fx formula does."
- "This flow expression throws on null. Rewrite it to handle a missing service location."
- "Add a delegation-friendly filter to this gallery's Items property."
Type # to reference a specific file, or @workspace to ask project-aware questions with real file references.
Agent mode
In the Chat panel, switch the mode dropdown to Agent. Now Copilot can plan a change, edit multiple files, and run terminal commands to accomplish a larger request — then you review and Keep or discard the changes. This overlaps with what Claude Code does; the next section explains when to reach for which.
4. Teach Copilot Your Power Platform Conventions
This is the single highest-leverage step. Create a file at .github/copilot-instructions.md in your project root. Copilot automatically includes it as context in every suggestion and chat — so it stops guessing your table names and choice values.
# Contoso Field Service — Copilot instructions
## Project
Power Platform solution. Assets live as code:
- Canvas apps as .pa.yaml
- Flows as exported JSON
- Power Pages as Liquid + JS + CSS
- Code Apps as React + TypeScript (Fluent UI v9)
## Conventions
- Table prefix: fs_ (e.g. fs_workorder, fs_technician)
- Choice prefix: fs_choice_
- fs_status values: 1=Draft, 2=Scheduled, 3=InProgress, 4=Complete
- fs_priority values: 1=Low, 2=Medium, 3=High, 4=Critical
## Rules
- Power Fx: wrap every Patch() in IfError()
- Every gallery needs an empty-state message
- No hard-coded GUIDs — use environment variables
- TypeScript: strict mode, no `any`, typed service layer
Now when you type fs_status eq in a flow filter, Copilot completes it with the right numeric value — because you told it 3 means In Progress. Populate this file before your first real session; it's a 15-minute investment that makes every suggestion sharper.
5. The Coding Agent — Hand Off a Whole Issue
The three Copilot surfaces above all live inside your editor. There's also a cloud-based coding agent that lives on GitHub.com — you assign it an issue, and it opens a pull request with the change and waits for your review. No editor required, no laptop needed.
How it works
- Open a GitHub issue with a clear description (what to change, where, what done looks like).
- Open the issue's Assignees panel → choose Copilot. (Or comment
@copiloton an existing PR.) - You'll see a 👀 reaction within seconds — the agent has started.
- Behind the scenes Copilot boots an ephemeral VM (powered by GitHub Actions), clones the repo, plans the work, writes the change, runs your tests/linters, and opens a PR.
- Review the PR like any other. Leave comments and the agent revises until you approve.
Built-in safety rails
- The agent can only push to branches it created — your default branch and your team's branches are safe.
- The person who assigned the issue cannot approve the resulting PR — so your required reviewers rule still applies.
- It honours your repo's branch protection, CI checks, and review policies — it just participates in the same gates as a human.
For Power Platform projects
Great fits: small flow JSON fixes, Power Pages template tweaks, Code App TypeScript refactors, adding a missing column to a Dataverse schema script, regenerating pa.yaml with a small change. Less great fits (today): anything that needs live PAC CLI auth to a Dataverse environment, since the agent's VM doesn't have your tenant credentials.
Availability: included with Copilot Pro, Pro+, Business, and Enterprise. Free tier doesn't get it. Generally available since early 2026.
6. Extend Copilot Chat with MCP Servers
Copilot Chat supports the Model Context Protocol — the same MCP standard Claude Code uses. That means you can plug the Dataverse MCP server (or any other MCP) into Copilot Chat, so it reads your real environment instead of guessing schemas. This is what closes the "Copilot doesn't know my tables" gap.
Configure an MCP server in VS Code
Pick one path. Both write JSON config files VS Code reads at startup.
Easiest — from the gallery: open the Extensions view (Ctrl+Shift+X), type @mcp in the search box, pick an MCP server, and install. VS Code writes the config for you.
By hand — per project: create .vscode/mcp.json in your project root. The schema uses a top-level servers key (note: it's servers in VS Code, not mcpServers like Claude Code uses):
{
"servers": {
"dataverse": {
"command": "npx",
"args": ["-y", "@microsoft/dataverse-mcp"],
"env": {
"DATAVERSE_URL": "https://contoso-dev.crm.dynamics.com"
}
}
}
}
By hand — globally (all projects): open the Command Palette (Ctrl+Shift+P) → MCP: Open User Configuration and edit the same shape there.
Use it in Chat
Important: MCP tools are only available in Agent mode. They're hidden in Ask and Edit modes.
- Open Copilot Chat (
Ctrl+Alt+I). - Click the mode dropdown at the bottom-left of the chat input → choose Agent.
- Click Configure Tools next to the chat input — your MCP servers and their tools appear in the list. Toggle the ones you want this session.
- Ask away — Copilot will call the MCP tools when relevant: "Add a fs_priority column to fs_workorder" and Copilot can verify your existing schema first.
The same Dataverse MCP server can be configured for Claude Code too. Configure it once in your project, and both AI assistants read the same environment — same schema, same answers.
7. Copilot + Claude Code — Who Does What
They're complementary, not competing. The simplest way to hold it in your head:
| GitHub Copilot — file scope | Claude Code — project scope |
|---|---|
| Inline formula & expression completion as you type | Generates whole solutions across many files at once |
| Targeted rewrites of the code in front of you | Runs PAC CLI, manages git, iterates compile-fix loops |
| Explaining unfamiliar Power Fx / FetchXML / Liquid | Designs system prompts, topic YAML, agent structure |
| Fast, in-the-moment edits while you read | Multi-step tasks you hand off and review |
Typical flow: Claude Code scaffolds the solution and wires up the plumbing. You open the result in VS Code, and Copilot helps you read, refine, and complete the details line by line. Two assistants, one project.
8. Your First Copilot Completion
Quick test that everything works and your instructions are loaded. In a flow JSON file (or any file), start typing a comment describing intent:
// OData filter: work orders that are In Progress and high priority
Press Enter and start the filter. With your copilot-instructions.md in place, Copilot should suggest something like fs_status eq 3 and fs_priority eq 3 — using your actual choice values, not invented ones. Press Tab to accept. If it nails the numbers, your setup and your instructions file are both working.
- Copilot lives in your editor. Install the extension in VS Code, sign in with GitHub, and you get inline completions, Chat, and agent mode.
- There's a Free tier. Enough to follow this guide; Pro/Pro+ raise the limits.
- copilot-instructions.md is the unlock. One file in
.github/teaches Copilot your table names, choice values, and rules — every suggestion gets sharper. - The cloud coding agent ships PRs without your laptop. Assign an issue to Copilot → it boots a VM, writes the change, runs your checks, opens a PR. Pro/Pro+/Business/Enterprise only.
- MCP closes the schema gap. Plug the Dataverse MCP into Copilot Chat (
.vscode/mcp.json, Agent mode) and Copilot reads your real tables, same as Claude Code. - Copilot is file scope, Claude Code is project scope. Use Claude Code to build the solution; use Copilot to read and refine it line by line.
- Tab accepts, Esc dismisses. Inline completions are the fastest win — they save the most keystrokes in pa.yaml and flow JSON.
Where to Next
- Set up the other half of your AI dev team: Claude Code Setup Guide for Power Platform.
- Get your project into version control so both assistants' output is tracked: GitHub Desktop Setup Guide.
- Read Chapter 2 — Your AI Dev Team for the deeper version, including Copilot and Claude Code side by side on the same project.