Setup guide for Github -> Copilot
Last updated: August 21, 2026
This plugin connects Microsoft 365 Copilot Cowork to GitHub through GitHub's official remote MCP server. Once set up, you can read issues, browse code, and open draft pull requests from inside a Cowork conversation, alongside email, files, and Teams context.
Package:
This guide is for the person setting the plugin up for an organization. End users don't need it. There's a handoff message at the bottom you can send them instead.
The package ships unconfigured: its referenceId is a placeholder, and the plugin will not connect until you complete Part 1 below. This is intentional. Your organization registers its own OAuth client, so your users authenticate through credentials you own and control.
How the setup is structured
Three things happen at different scopes. Confusing them is the main source of trouble.
Scope | Who does it | Effort | |
|---|---|---|---|
OAuth registration | Once per tenant | One technical person | ~15 min |
Package deployment | Once per tenant | An admin | ~5 min |
GitHub sign-in | Every user | Each person, for themselves | ~30 sec |
Individual users never touch OAuth and never upload anything. They click Connect and sign in with their own GitHub account, with their own permissions.
Do not have users sideload the package themselves. Cowork enforces one owner per manifest ID per tenant, so the second person to upload it gets:
This manifest ID already belongs to a plugin someone else owns.
Giving each person their own manifest ID "fixes" this, but leaves you with divergent copies you can't update. Admin deployment is the supported path.
Requirements
Requirement | Notes |
|---|---|
Microsoft 365 Copilot license | Required for every user |
GitHub account | Any plan. The MCP server is available to all GitHub users regardless of plan type |
A GitHub OAuth App | Created under a personal GitHub account (no GitHub org admin needed) |
Teams developer portal access | dev.teams.microsoft.com |
A Microsoft 365 admin | For the one-time package deployment |
Part 1: OAuth setup (once per tenant)
GitHub does not support Dynamic Client Registration on its remote MCP server, so Cowork can't create an OAuth client automatically. Each organization registers its own.
Step 1: Create a GitHub OAuth App
GitHub → Settings → Developer settings → OAuth Apps → New OAuth App
Create it under a personal account, not the organization. It still works against org repositories and you won't need org-owner rights.
Field | Value |
|---|---|
Application name |
|
Homepage URL |
|
Authorization callback URL |
|
Allow wildcard matching | Unchecked |
Enable Device Flow | Unchecked |
Expire user access tokens | Checked (default, and it's what provides refresh tokens) |
Copy and paste the callback URL. It's Teams' fixed redirect, identical for every plugin and provider, so never customize it. A mismatch here is a common cause of sign-in failure.
Select Register application, then:
Copy the Client ID
Select Generate a new client secret and copy it right away, since it's shown only once
Step 2: Register the OAuth client in Teams developer portal
dev.teams.microsoft.com → Tools → OAuth client registration → Register client
Field | Value |
|---|---|
Registration name |
|
Base URL |
|
Restrict usage by org |
|
Restrict usage by app |
|
Client ID | From Step 1 |
Client secret | From Step 1 |
Authorization endpoint |
|
Token endpoint |
|
Refresh endpoint |
|
Scope |
|
Client password authentication method | Request body parameters (default) |
Enable PKCE | Off |
Base URL: read this before you continue
Enter the origin only: https://api.githubcopilot.com
Do not enter https://api.githubcopilot.com/mcp/, even though that's the URL in the manifest and Microsoft's documentation says the Base URL "should correspond to" it. Including the path produces:
Connector unavailable. 'GitHub' isn't set up correctly by its publisher: the address its server is registered at doesn't match the one in its sign-in configuration.
The field wants a base that the manifest URL sits underneath. This is verified behaviour and was the single blocking issue during setup.
Other fields worth noting
Token and Refresh endpoints are the same URL. Correct for GitHub.
PKCE off. GitHub describes PKCE as upcoming, not current.
Request body parameters is how GitHub documents its token endpoint. If token exchange fails with an invalid-client error, HTTP Basic is the fallback.
Select Save, then copy the OAuth client registration ID.
Scopes
repo: read/write issues, PRs, branches, file contents. Required for drafting PRs. It is broad; a GitHub App with fine-grained permissions is the tighter alternative.read:org: lets repository listing see organization repositories.read:user: backs the account identity check.
Step 3: Put your registration ID in the manifest
Unzip the package, open manifest.json, and replace the placeholder:
json
"authorization": {"type": "OAuthPluginVault","referenceId": "REPLACE_WITH_AUTH_CONFIG_ID"}Re-zip with all files at the root level, and don't nest them inside a folder:
bash
zip -r github-for-cowork.zip manifest.json color.png outline.png tools/ skills/powershell
Compress-Archive -Path manifest.json, color.png, outline.png, tools, skills -DestinationPath github-for-cowork.zipPart 2: Deploy the package (once per tenant)
Requires Teams Administrator, Copilot Administrator, or Global Administrator.
Go to admin.microsoft.com
Settings → Integrated apps (labelled Agents in some tenants)
Select Upload custom apps
Upload your configured
.zipAssign to Specific users/groups for a first test, or Entire organization
Confirm and deploy
Allow a few minutes to propagate.
Before deploying, have anyone who sideloaded the package remove their copy. Two sources for the same manifest ID will conflict.
Admin-deployed plugins appear in users' Sources & Skills automatically, labelled Managed by your organization. Users can't remove them, but can enable or disable them per device.
Part 3: Each user connects (30 seconds)
Admins cannot sign in to GitHub on a user's behalf. Each person authorizes once.
Open the plugin in Customize → Plugins → GitHub for Cowork
Select Connect next to the GitHub MCP server entry
Complete the GitHub sign-in
Start a new conversation and send:
set up GitHubThat triggers the setup workflow: confirms which GitHub account was authorized, lists reachable repositories, and asks which repo and base branch to use.
Tool discovery happens at conversation start, so always start a fresh conversation after connecting.
Using it
"What are the open bugs in my repo?"
"Read issue 42 and tell me what it's asking for."
"Turn this email thread into a draft PR."
"Fix the typo in the README and open a draft pull request."
Safety behaviour
Built into the skill:
Changes land on new
copilot/<description>branches, never the base branchPull requests open as drafts unless the user says otherwise
Files are read before they're rewritten
Merging, closing, deleting, and force-pushing are refused
If the connector is unavailable, the skill says so and stops. It will not substitute a local git repository or recalled details
Customer names, credentials, and internal URLs are redacted before anything is committed
These are prompt-level conventions, not API-enforced. The connector exposes write tools the skill declines to use, including merge_pull_request and delete_file.
The user's GitHub token permissions are the hard boundary. For a real restriction:
Scope a fine-grained GitHub token to specific repositories, or
Set
mcpServerUrltohttps://api.githubcopilot.com/mcp/readonly, which makes GitHub refuse all write tools server-side, andEnable branch protection on your default branch
Cowork also prompts for approval before each write operation.
Optional: pin a default repository
This isn't required, since set up GitHub lets each user pick a repo per conversation. If everyone works in one repo, edit skills/github-repo-workflow/SKILL.md, replace REPLACE_WITH_OWNER / REPLACE_WITH_REPO under Default Repository, and re-zip.
If different people use different repos, leave the placeholders.
Troubleshooting
Symptom | Cause and fix |
|---|---|
| Someone already sideloaded the package in this tenant. Deploy via admin center instead of per-user uploads |
| Base URL includes the path. Set it to |
|
|
Upload rejected on a manifest field | Manifest v1.28 sets |
Plugin appears but GitHub isn't connected | Normal. The user needs to click Connect |
Redirect or callback error at sign-in | Callback URL in Step 1 isn't exactly the Teams redirect |
Invalid client at token exchange | Try HTTP Basic instead of Request body parameters |
Sign-in works, org repos missing or 403 | GitHub org blocks OAuth Apps pending approval |
Sharing with specific users finds nobody | The people picker needs a working Exchange mailbox. Use admin deployment instead |
Worked, then stopped mid-session | Connector dropped, usually after a package change. Start a new conversation |
A change seems to have no effect | Tool discovery happens at conversation start. Start a new conversation |
GitHub organization approval
The most common late-stage blocker. GitHub organizations may block OAuth Apps until an admin approves them; personal repositories are unaffected. Symptom: sign-in succeeds but org repos 403 or don't appear.
An org owner approves at:
https://github.com/organizations/[ORG_NAME]/settings/oauth_application_policyMembers can request approval from the same page.
Copilot Business / Enterprise policy
If the GitHub organization is on Copilot Business or Enterprise, the "MCP servers in Copilot" policy may need enabling. This is documented for Copilot-in-IDE usage; whether it gates other hosts isn't explicitly stated. Worth checking if authorization fails for no other clear reason.
Known constraints
Requires Streamable HTTP over HTTPS. GitHub's hosted endpoint complies
API key authentication isn't supported in Cowork; use OAuth
GitHub Enterprise Server can't use the remote endpoint and needs the self-hosted MCP server. GitHub.com and Enterprise Cloud are fine
Tenants with Microsoft Purview Information Barriers enabled block plugin uploads entirely
Maintenance
The GitHub client secret lives in the Microsoft Enterprise token store, never in the package
Rotating or deleting the GitHub OAuth App breaks the connector for every user at once
The registration is scoped My organization only. Cross-tenant use requires Any Microsoft 365 organization, and the registration should then be bound to a specific Teams app ID rather than Any Teams app
Users can revoke their own authorization from Chat settings → Agents
Handoff message for end users
GitHub in Cowork is now available.
It's already installed. You'll find GitHub for Cowork under Sources & Skills.
To start:
Open Customize → Plugins → GitHub for Cowork
Click Connect and sign in with your GitHub account
Start a new conversation and send:
set up GitHub
You'll be asked which repository to work in. You're acting as your own GitHub account, so you can only see and change what you normally could.
Changes always go on a new branch, pull requests always open as drafts, and nothing gets merged automatically.