web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Custom Connector Works...
Copilot Studio
Suggested Answer

Custom Connector Works in PowerApps but Fails in Copilot Studio Agent – JsonReaderException Error

(0) ShareShare
ReportReport
Posted on by
I have created a custom connector called DoorLoopConnector in Make.PowerApps. After that, we created an action to get tenant data. When we test the API, it works fine and returns a status code 200.
However, the issue occurs when we connect this connector in Copilot Studio to retrieve data in the agent.
First, we create a new agent. After that, we add the DoorLoopConnector – getTenants action in the Tools section. Then we publish the agent.
When we enter the prompt “show all the tenant details”, the following error appears:
Error Message:
Evaluating PowerFx expression resulted in error while invoking the connector:
PVA.getTenants failed: JsonReaderException '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
Error Code: ConnectorPowerFxError
Conversation Id: 0cabb15b-f541-474e-9fdd-6d23631ae22e
Time (UTC): 2026-03-12T11:03:40.184Z
Image 2.PNG
Image 3.PNG
Image 4.PNG
I have the same question (0)
  • Suggested answer
    Prasad-MSFT Profile Picture
    Microsoft Employee on at
    This error means your DoorLoopConnector’s getTenants action is returning data in a format that Copilot Studio (and Power Fx) does not expect. Specifically, the error:
    JsonReaderException '<' is an invalid start of a value.
    indicates that the connector is returning HTML (often an error page or login page), not JSON.
     
    Why this happens:
    • When you test in PowerApps, you may be authenticated, so you get JSON.
    • When called from Copilot Studio, the connector may not be authenticated, or the API endpoint is returning an error page (HTML) instead of JSON.
    How to fix:
    Check Authentication:
    Ensure the connector is set up with proper authentication (OAuth2, API key, etc.) and that Copilot Studio has access.
    Re-authenticate the connector in Copilot Studio if needed.
    Check API Endpoint:
    Make sure the endpoint URL is correct and accessible from Copilot Studio.
    Handle Errors in the Connector:
    Update the connector’s definition to handle non-JSON responses gracefully, or ensure the API always returns JSON (even for errors).
    Test in Copilot Studio:
    Use the “Test” feature in Copilot Studio’s Tools section to see the raw 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 277

#2
11manish Profile Picture

11manish 206

#3
sannavajjala87 Profile Picture

sannavajjala87 156 Super User 2026 Season 1

Last 30 days Overall leaderboard