Hi Mamta,
This is a common issue with custom connectors in Copilot Studio. Even though your connector returns HTTP 200, there are several Copilot-specific requirements that could be causing the ConnectorRequestFailure. Here are the most likely causes and solutions:
Common Causes & Solutions
1. Response Schema Mismatch
The most common issue is a mismatch between your defined schema and actual response structure.
Solution:
- In your custom connector, go to Definition → Response
- Ensure the schema exactly matches your actual response structure
For your OData response, the schema should be: { "type": "object", "properties": { "d": { "type": "object", "properties": { "results": { "type": "array", "items": { "type": "object", "properties": { "BusinessPartnerID": {"type": "string"}, "CompanyName": {"type": "string"}, "EmailAddress": {"type": "string"} } } } } } } }
2. Missing Required Headers
Copilot Studio is stricter about headers than the test interface.
Add these headers to your connector definition:
-
Content-Type: application/json -
Accept: application/json - Consider adding
Cache-Control: no-cache
3. Authentication Context Difference
The connector test uses different auth context than when called from a topic.
Check:
- Is your API expecting specific authentication headers?
- Try adding explicit authentication parameters in the connector definition
- Verify the service account/connection has proper permissions
4. Response Size/Timeout Issues
Copilot Studio has stricter limits than the test interface.
Try:
- Reduce response size further (try
$top=1) - Add timeout handling in your API
- Ensure response time is under 30 seconds
5. OData Format Handling
Copilot Studio might have issues with OData envelope format.
Consider flattening the response: Instead of returning the OData envelope, modify your API or
connector to return:
[
{
"BusinessPartnerID": "0100000000",
"CompanyName": "SAP",
"EmailAddress": "******@sap.com"
}
]
Debugging Steps
1. Enable Detailed Logging
In your topic, add more trace statements:
Trace("Before connector call")
Set(varResult, Connector-GWSample.Run())
Trace("Response: " & Text(varResult))
Trace("Error: " & Text(IsError(varResult)))
2. Test with Simplified Response
Temporarily modify your API to return a very simple response:
{"test": "success"}
3. Check Connector Permissions
- Verify the connector is shared properly with your Copilot
- Check if there are any environment-specific restrictions
Quick Fix to Try
Since you're getting ConnectorRequestFailure specifically, try this:
- Recreate the connector with a minimal schema
- Test with the simplest possible response first
- Gradually add complexity until you identify what breaks it
The fact that it works in the connector test but fails in the topic strongly suggests a schema/format issue rather than a connectivity problem.
Thanks,
Karan Shewale.
*************************************************************************
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.