Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Gp1s1xB10lXiwO38jCv44Q
Copilot Studio - Calling Actions from Copilot S...
Suggested answer

Error when trying to add a Custom Connector with MCP SSE as Actions.

Like (0) ShareShare
ReportReport
Posted on 23 Mar 2025 17:29:08 by 2
When adding a custom connector operation which  produces: text/event-stream for MCP SSE communication, clicking the operation in Copilot Studio causes a TypeError: Cannot read properties of undefined (reading 'find'). The connector matches the MCP SSE transport specification and the Copilot Studio sample, works in Power Apps, and the server responds correctly.

The Custom Connector Test functionality works fine with 200 status and schema validation successful. But when adding an Action with the custom connector is showing this error on Browser Console.

Uncaught (in promise)
    1. message: "Cannot read properties of undefined (reading 'find')"
    2. name: "TypeError"
    3. stack: "TypeError: Cannot read properties of undefined (reading 'find')\n at https://content.powerapps.com/resource/makerx/static/js/module/ActionCreationWizard~~697903b6.3ca264bd.chunk.js:2:55495\n at Generator.next (<anonymous>)\n at m (https://content.powerapps.com/resource/makerx/static/js/module/ActionCreationWizard~~697903b6.3ca264bd.chunk.js:2:54268)\n at a (https://content.powerapps.com/resource/makerx/static/js/module/ActionCreationWizard~~697903b6.3ca264bd.chunk.js:2:54471)"
    4. [[Prototype]]: Object
  • CU23031722-0 Profile Picture
    2 on 25 Mar 2025 at 00:16:58
    Error when trying to add a Custom Connector with MCP SSE as Actions.
    It says Currently, Copilot Studio only supports the Server-Sent Events (SSE) transport, may be the changes have not been rolled out to all regions ?
     
  • Suggested answer
    sandeepstw Profile Picture
    302 Super User 2025 Season 1 on 24 Mar 2025 at 17:00:16
    Error when trying to add a Custom Connector with MCP SSE as Actions.
    You are getting an error TypeError: Cannot read properties of undefined (reading 'find') when adding an action using a custom connector that uses Server-Sent Events (SSE) with text/event-stream in Copilot Studio. The connector works in Power Apps and passes all tests, but fails in Copilot Studio with a browser console error.
    1. Copilot Studio might not fully support text/event-stream responses in custom connectors, especially when used directly as an action. This response type is streaming and may not be parsed properly.
    2. Check if your operation in the connector returns a well-defined schema. Even though it's streaming, define a response like:
    json > 
    {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        }
      }
    }
    3. Go to the custom connector JSON file or definition, check responses section for the operation and ensure there's a 200 response with correct schema.
    4. Avoid using text/event-stream directly. Try modifying the backend to respond with application/json temporarily to test. If it works, issue is with SSE not being handled by Copilot Studio UI.
    5. If possible, switch the SSE call to a polling-based API (e.g., fetch latest message via GET every few seconds). This avoids streaming and works with Copilot.
    6. Check if the connector exceeds response size limit (500 KB), Copilot Studio has strict limits.
    7. If you need to keep using SSE, do not define it as an action. Handle it outside Copilot Studio or via Power Automate, then pass results to Copilot Studio using environment variables or a data source.
    8. Use browser dev tools > Network tab to confirm Copilot Studio is sending request correctly and backend is returning proper headers (Content-Type: text/event-stream).
    9. As a workaround, build a proxy API that converts the SSE stream to regular JSON responses.
    10. If nothing works, open Microsoft support ticket with full connector definition, console error, and steps to reproduce.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard

Featured topics

Loading started