Skip to main content

Notifications

Community site session details

Community site session details

Session Id : fMRu60eudRw16zqp5EatPg
Power Apps - Connector Development
Unanswered

Expected array, got string error in Power Platform Custom Connector

Like (2) ShareShare
ReportReport
Posted on 8 Apr 2025 15:46:44 by 4

Hi everyone,
I am building a Custom Connector in Power Platform for my pharma inventory MCP API. It is powered by a Node.js Express server exposed via ngrok and defined using Swagger 2.0.
I have two endpoints:
POST /invoke – works as expected
GET /tools – throws an error only inside the connector test tab
"Property "" type mismatch, Expected: "array", Actual: "string""However, when I test the same GET /tools endpoint using a browser, Postman, or curl, it correctly returns a JSON array. The server sets the Content-Type to application/json, and the Swagger spec defines the response as type: array with items of type: object.
I have already tried the following:
Set the Accept: application/json header in the Swagger definition
Restarted ngrok and updated the Swagger host accordingly
Verified that the response from the server is not HTML or a string
Still, Power Platform interprets the response incorrectly.
Has anyone else experienced this with custom connectors? How can I ensure Power Platform reads the JSON array correctly from a GET endpoint?
Thanks
Aditya Sinha
  • AS-08041537-0 Profile Picture
    4 on 09 Apr 2025 at 15:10:47
    Expected array, got string error in Power Platform Custom Connector
    @MichaelFP the swagger or yml is as expected and the output is correct when i go the ngrok url or localhost. Just that when i test it in my custom connector, it defaults back to the ngrok html page.
  • AS-08041537-0 Profile Picture
    4 on 09 Apr 2025 at 15:08:06
    Expected array, got string error in Power Platform Custom Connector
    @MS.Ragavendar the postman responses are as expected.
  • MS.Ragavendar Profile Picture
    1,659 on 09 Apr 2025 at 13:13:34
    Expected array, got string error in Power Platform Custom Connector
     
    Did u test the endpoint with the postman, what is the output in the postman.
  • MichaelFP Profile Picture
    1,831 Super User 2025 Season 1 on 09 Apr 2025 at 12:00:37
    Expected array, got string error in Power Platform Custom Connector
    when you see the swagger in the custom connector, what show to you in the response?

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!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 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,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,075 Most Valuable Professional

Leaderboard

Featured topics