Cowork, Code & Per-User GitHub
The dynamic manifest v1.29 plugin connects Microsoft 365 Copilot Cowork and Code to your deployed
HVE Squad MCP server with live tools/list discovery, OneDrive/SharePoint project continuity, and
opt-in per-user GitHub Copilot identity.
Licensing and billing modes#
Every user needs their own Microsoft 365 Copilot / Cowork or Copilot Studio host licence. On the server side, inference licensing depends on the execution mode the operator configures:
| Mode | Settings | Server inference licence / billing | Intended use |
|---|---|---|---|
| Built-in (Azure OpenAI) default |
stageExecutor='builtin', enablePerUserGithub=false |
No GitHub Copilot licence used. Billed per token to the operator's Azure OpenAI subscription, capped by SQUAD_MCP_TENANT_COST_CEILING_USD. |
Production Copilot Studio & Cowork advisory deployments. |
| Copilot SDK (shared) | stageExecutor='copilot', enablePerUserGithub=false |
Single shared GitHub Copilot identity supplied via SQUAD_MCP_COPILOT_GITHUB_TOKEN*. Shared quota and attribution. |
Testing only. Copilot seats are licensed per person; do not share one seat across production users. |
| Copilot SDK (per-user) | stageExecutor='copilot', enablePerUserGithub=true |
Per-user GitHub Copilot licence. Each user signs in with Entra and links their own GitHub account via squad_github_connect; every run consumes that user's own Copilot seat and quota. |
Single-tenant partner and enterprise pilots where each user brings their own Copilot seat. |
Dynamic Cowork + Code v1.29 plugin#
The primary plugin lives under cowork/ and uses M365 app manifest v1.29 with one
agentConnectors entry and no pinned mcpToolDescription. Cowork connects
to your HTTPS /mcp endpoint, sends initialize, and discovers the enabled tool surface
from tools/list at runtime.
hve-project-manager— manages a GUID-bound OneDrive or SharePoint project folder, runs pre-model context preflight, starts all work throughsquad_run, relays human answers viasquad_respond, pollssquad_status, and mirrors canonical files via read-onlysquad_history.hve-code-implement(experimental) — explicit native implementation from versioned saved specs intoimplementation/with verified evidence receipts. It never replaces the project manager's state ownership or auto-deploys.generated/cowork-package/— remains a separate manifest1.28static compatibility package built bynpm run generate:cowork; usecowork/for v1.29 testing.
Compile and upload the plugin#
Never write live tenant IDs, endpoints, or credentials into tracked repository files. Persist local deployment
metadata exclusively under gitignored deploy-output/ and compile the uploadable archive with
npm run cowork:compile (or the repository's deploy-mcp-cowork agent skill):
-
Authorize the Enterprise Token Store (
ab3be6b7-f5df-413d-ac2d-abf1e3fd9c0b) on your Entra resource app under Expose an API for the delegated scopes your users need (Squad.Run,Squad.Memory, and any optional scopes — never grantSquad.Operateto all users), and add redirect URIhttps://teams.microsoft.com/api/platform/v1.0/oAuthConsentRedirect. -
Create a Microsoft Entra SSO registration in the Teams Developer Portal pointing Base URL at
https://<FQDN>/mcp, then add the generated Application ID URI to your Entra app'sidentifierUris(see cowork/SETUP.md). -
Save local config and compile into
deploy-output/hve-squad-cowork.zip:npm run generate:cowork:plugin:check npm run cowork:compile -- --save-config \ --fqdn "<CONTAINER_APP_FQDN>" \ --oauth-reference-id "<OAUTH_CLIENT_REGISTRATION_ID>" \ --tenant-id "<ENTRA_TENANT_ID>" \ --resource-client-id "<SQUAD_RESOURCE_CLIENT_ID>" -
Optionally verify live discovery against the deployed server before uploading:
npm run cowork:compile -- --verify-live --bearer-token "<ACCESS_TOKEN>" -
Upload in Cowork: open Customize → Plugins → Upload plugin and select
deploy-output/hve-squad-cowork.zip. Subsequent rebuilds reusedeploy-output/mcp-deployment.local.jsonvianpm run cowork:compileorpwsh -NoProfile -File cowork/pack.ps1.
Per-user GitHub identity and isolation#
When SQUAD_MCP_PER_USER_GITHUB_ENABLED=true is enabled alongside
SQUAD_MCP_STAGE_EXECUTOR=copilot, both Cowork and Copilot Studio share one user-scoped identity and
storage boundary (full checklist in
docs/reference/per-user-github.md):
- Stable owner key: validated Entra
(tid, oid)— never email, host, orsub. Storage is partitioned byuser-plus SHA-256 ofJSON.stringify([tid, oid]). - End-user connections only: configure both Cowork and Copilot Studio with end-user Entra credentials, never a shared maker connection.
- Separate GitHub OAuth link: users call
squad_github_connectto complete a browser Entra ownership check and GitHub App (preferred) or OAuth App grant. Entitlement is verified with zero cache (verifyCacheMs: 0) and rechecked before each turn and every 15 seconds. - Pinned link generation: runs pin a link generation preserved across normal token refreshes. Unlinking takes effect immediately locally; relinking creates a new generation and old runs never silently adopt it.
- No fallback to shared credentials: if a user's link is missing or revoked, execution fails closed rather than falling back to a server token. New per-user async runs have a 7-day TTL.
Current hosting constraints#
Know these boundaries before exposing per-user Copilot mode to users.
- Single Entra tenant only:
allowedTenantsmust contain exactly one tenant ID matchinglinkEntraTenantId. Multi-tenant browser linking is not supported. - No Graph / SharePoint memory in per-user mode: no downstream Entra OBO exchange is implemented,
so
SQUAD_MCP_MEMORY_BACKEND=graphis disabled. Use Azure Table Storage or durable file storage. - Single web replica and distinct worker sandbox: the Copilot SDK binds to one session-filesystem
owner. Pin the web Container App to
1replica, mount an existing ACA AzureFile binding (copilotSessionStorageName) atSQUAD_MCP_COPILOT_SESSION_STATE_DIR, and provision a separate headless runtime for the worker (workerCopilotCliUrlmust differ fromcopilotCliUrl). - Sandbox production hardening: as documented in host/sandbox/README.md, multi-tenant hosted production still requires a fresh ephemeral sandbox per run, a replicated session-state store, a private network between server and sandbox, and a network-layer egress proxy blocking cloud metadata endpoints.