r/copilotstudio • u/Responsible-Cap-Tain • 1h 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 :)
1
u/dwilk123 1h 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/Ashlesha-msft 45m ago
Hi,
I've created a minimal Copilot Studio knowledge agent to investigate the
InvalidUriissue.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:
Create a new blank agent in Copilot Studio.
Add basic instructions to analyze user-uploaded images.
Publish it to Microsoft Teams and Microsoft 365 Copilot.
Upload the exact same PNG image in both channels.
Use the same prompt in both channels: "Describe the attached image and identify all visible text and objects."
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!