r/copilotstudio • • 14d ago

Copilot Agent responds with error in Copilot app but not in Teams

Long story short: I've created a simple knowledge agent in Copilot Studio and deployed it to Copilot app and Teams.
Scenario:
When a user writes a message and attaches an image to get an answer based on the image that agent responds with:

Copilot app: Error: InvalidUri

Teams: Happily analyzes the image and answers the user.

How does it work in Teams and not in Copilot app which should be the native place to interact with it?

I know I can handle it with a topic that handles messages which include an image, but this simply shouldn't be the way to fix this since it works in Teams.

Is there something I'm overlooking?

Thanks in advance :)

2 Upvotes

5 comments sorted by

2

u/Ashlesha-msft 14d ago

Hi,

I've created a minimal Copilot Studio knowledge agent to investigate the InvalidUri issue.

Agent configuration:

  • Created a new blank agent.
  • Added basic image analysis instructions.
  • Added a knowledge source.
  • Published the agent to Microsoft Teams and Microsoft 365 Copilot.
  • No custom topics, Power Automate flows, plugins, or custom actions.

My test results:

  • Microsoft 365 Copilot: Image uploaded and analyzed successfully.
  • Microsoft Teams: Image uploaded and analyzed successfully.
  • InvalidUri: Not reproduced so far.

Could you please create the same minimal agent in your environment and check whether you can reproduce the issue?

Troubleshooting steps:

  1. Create a new blank agent in Copilot Studio.
  2. Add basic instructions to analyze user-uploaded images.
  3. Publish it to Microsoft Teams and Microsoft 365 Copilot.
  4. Upload the exact same PNG image in both channels.
  5. Use the same prompt in both channels: "Describe the attached image and identify all visible text and objects."
  6. Check whether image analysis succeeds or returns InvalidUri.

If the issue persists, could you also share:

  • Copilot Studio environment region.
  • Agent ID and published version.
  • Microsoft 365 Copilot client (web or desktop).
  • Image format and file size.
  • Approximate timestamp of the failure (UTC).
  • Conversation/session ID and any available diagnostic trace.

Also, please confirm whether the issue occurs with a newly created minimal agent or only with your existing knowledge agent.

This will help us determine whether we're dealing with a channel-specific issue, an agent configuration issue, or an environment-specific problem.

Thanks!

1

u/Responsible-Cap-Tain 13d ago

Thanks for replying Ashlesha.
Since Copilot and other services are down right now I'll test it and get back to you, when the services are back online :)

1

u/dwilk123 14d ago

Has to deal with how those two channels handle file processing at runtime.

I do not publish my agents to M365 for exactly this reason.

If memory serves me correctly- it’s something to do with m365 creates a saved file but doesn’t actually process the file, it only passes a file id to agent- hence the error.

1

u/Responsible-Cap-Tain 13d ago

Thanks for the reply :)
Do people not question your agents not being available in the Copilot app?
We've tried doing it to Teams but then people ask "Why is the Copilot agent not in the Copilot app?"

Or what has your experience been?
I'm thinking of switching to "Teams by default - Copilot app as fallback" and then communicate that out to the employees.

1

u/dwilk123 13d ago

Yup- and I explain the user experience problem.

At end of day, one of my agents primarily responsibilities is to ingest complex data, assess it deterministically and provide downloadable output.

Teams channel and sharepoint channel just seem to handle that exponentially easier.

I’m sure I could figure out the M365 drama with enough time- but that’s kinda the point; Microsoft needs to get their shit together and stop having channels with completely different architecture and experiences.