Skip to content

[SharePoint Copilot Apps preview] "Add to Teams" fails with "Couldn't add app to Teams" for ALL packages after tenant moved to unified app management / Targeted Release #10975

Description

@nolanhurlburt

SharePoint Online / SharePoint Framework

Additional environment details

Describe the bug / error

Pressing "Add to Teams" in the tenant app catalog's Manage Apps page fails after a few seconds with the toast "Couldn't add app to Teams — Check your network connection and try again", for both:

  1. A new SharePoint Copilot App package (aic-prompt-library-client-side-solution v1.4.0.0 — one declarative agent, one CopilotComponent tool, works in the Copilot Component Workbench), and
  2. An unrelated, unchanged package from a separate mid-July project (tt-ops-client-side-solution v1.7.0.0).

Two packages with different histories failing identically across every publish path. Timeline note: the tenant was migrated to unified app management and had Targeted Release for everyone enabled (2026-07-30/31, per my #10945 reports) shortly before these attempts.

What I've ruled out

  • Package contents: extracted the .sppkg; ClientSideAssets/aic-prompts.zip is present and contains manifest.json (Teams manifest v1.29, version bumped 1.0.0 → 1.0.1), declarativeAgent.json (v1.7), ai-plugin.json with the generated functions[]/runtimes[] (placeholders {{TENANT_MCP_URL}} intact), instruction.txt, both icons.
  • App catalog recycle bin: empty (both stages).
  • Browser/session state: reproduced in a fresh InPrivate window.
  • Version staleness: agent manifest version and solution version both bumped and redeployed before retrying.
  • Teams admin center → Manage apps: searching for either app returns 0 items — no app object is ever created.
  • All three UI code paths: (1) the modern Manage Apps "Add to Teams" button, (2) the classic experience's "Sync to Teams" (Apps for SharePoint library → FILES ribbon), and (3) the enable-dialog integrated publish (fresh upload after full removal + recycle-bin purge; the "add to Teams" option was offered and taken) all fail — the last with "Could not add app to Teams. You can add it later in Manage App page." while the enable itself succeeds.
  • Package is fully Teams-conformant by the classic rules: skipFeatureDeployment: true, web part supportedHosts includes TeamsPersonalApp/TeamsTab, per-component teams/<componentId>_color.png (192×192) and _outline.png (32×32) packaged into ClientSideAssets, Teams manifest v1.29 with correct icon dimensions. The enable dialog's Teams option only appeared once these were present.

Root symptom isolated

Browser console during the failing press shows that all three UI paths converge on one legacy endpoint, which the service rejects:

POST https://<tenant>.sharepoint.com/sites/appcatalog/_api/web/TenantAppCatalog/SyncSolutionToTeams
→ 400 (Bad Request)

Call stack: custom-syncToTeamsSyncSolutionToTeams in sp-tenant-app-catalog-assembly_en-us_*.js — i.e., the modern "Add to Teams" button still drives the classic sync API, and that API is returning 400 under a fully-privileged interactive admin session, for both packages.

Response body:

{
    "error": {
        "code": "-1, System.Net.WebException",
        "message": "The remote server returned an error: (400) Bad Request."
    }
}

For completeness: the Sync-PnPAppToTeams cmdlet route is not a viable workaround — it fails with 10005 "Authentication method is not allowed" limitation (pnp/powershell#2501), and hand-uploading the generated agent zip is documented as unsupported because of the tenant placeholders. So on this tenant there is currently no path at all to publish a SharePoint Copilot App's declarative agent.

Questions

  1. Is the "Add to Teams" publish path known to be affected on tenants migrated to unified app management?
  2. Is this part of the fix wave referenced in SPFx Copilot Components - doesnt run on CopilotWorkBench and not deployed to teams #10945 ("most have not reached production yet, ETA end of next week")?
  3. Is there an interim supported path to get a SharePoint Copilot App's declarative agent into the tenant agent catalog?

/cc @jansenbe

Related: #10945, #10944, #10946

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions