SharePoint / SharePoint/sp-dev-docs

Tool Invocation Fails in Deployed Declarative Agent but Succeeds in Copilot Workbench

Open
#10,944 16 comments 0 reactions 1 assignee View on GitHub

@jansenbe is already working on this.

Since Jul 12, 2026.

area:spfx-copilot-apps status:fixed-next-drop status:working-on-it type:bug-suspected
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details
  • SPFx: 1.24 Beta 2
  • NodeJS: 22.23.1
Describe the bug / error

The Copilot component was built and deployed to the Tenant App Catalog. I used the "Add to Teams" option and installed the agent from Agent365. However, when I try to invoke the agent from a Declarative Agent, the tool is not being called.

I tested both the out-of-the-box (OOTB) sample tools and custom tools, but neither of them works. The tools are invoked successfully in Copilot Workbench, but they do not work when the Declarative Agent is deployed.

Steps to reproduce
  1. Build and deploy the Copilot Component to the Tenant App Catalog.
  2. Use Add to Teams and verify the app is available.
  3. Install the agent from Agent365.
  4. Test the tool in Copilot Workbench – tool invocation works as expected.
  5. Open the deployed Declarative Agent in Teams/Microsoft 365 Copilot.
  6. Submit a prompt that should trigger the tool.
  7. Observe that the tool is not invoked.
Expected behavior

Tool should be invoked from the Declarative Agent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.