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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom connector retur...
Power Apps
Suggested Answer

Custom connector returns empty response body when used in canvas app

(2) ShareShare
ReportReport
Posted on by 15

Hello,

 

We run into a strange problem when using a custom connector to a REST API, and we hope anybody here can help us!


A call to the API should return a JSON object, and when we test the custom connector it works fine. The schema is validated correctly, status 200 is returned and the response body contains the object we want.

 

Schermafbeelding 2021-01-25 141453.png

 

When we use the connector in a canvas app however, we get the message "The data returned into the response is invalid. Response data should be a valid JSON object."

In the Power Apps Monitor we see that the response body is empty when run it from the app:


"response": {
"duration": 170.35,
"size": 0,
"status": 200,
"headers": {
"Content-Length": 0,
"Date": "Mon, 25 Jan 2021 11:54:11 GMT",
"x-ms-apihub-cached-response": true
},
"body": ""
}

The connection is OK, but the body should not be empty. When run from the Power Apps test environment or from Postman, the desired object is returned without any problems.

The Swagger file from which we constructed the connector is attached to this message.

 

Would anybody know what we are doing wrong here? Any help is very much appreciated!

Categories:
I have the same question (0)
  • BertMuller1968 Profile Picture
    15 on at

    Update: app works when run on phone, but still not when opened in web browser.

  • packnology Profile Picture
    138 on at

    Hi @BertMuller1968 did you ever figure out this problem? I'm having exactly the same issue. I notice that if I use the custom connector in a Power Automate flow it works, but it always returns an empty response body in a canvas app, and (unlike your description) is also empty when I use the test function in the custom connector designer.

    Thanks,

    Greg

  • seadude Profile Picture
    1,855 on at

    Similar issue here. 
    - Works in Custom Connector Test tab:

    seadude_0-1653856798722.png

     

    - Does not work in PowerApps

    seadude_1-1653856882761.png

     

    - This Custom Connector returns an plain SVG.

        - Do I need to URL Encode the SVG and pass it to the Custom Connector as JSON?

  • aditya281 Profile Picture
    2 on at

    Hi, I am facing similar issue.. were you able to figure out the root cause. For me, i get response in power automate but gets blank 200 OK response in canvas app or test tab of custom connector

  • NameOfUser Profile Picture
    3 on at

    I saw a similar issue. It ended up expecting an array of JSON objects rather than just a JSON object, even if we only passed it an array of length 1, something like this:

     

    [

        {

            cache-control": no-cache",

            content-encoding": gzip"

            ....

        }

    ]

  • Suggested answer
    CU02080718-2 Profile Picture
    27 on at
    Guys,
     
    I had this issue as well but finally got a fix.
     
    Please check and make sure your actual http or API response is the same as the imported/sample JSON response

    In my case i just provided the responses without the "status code" along with other, I just provided the body JSON response
  • Saikatk Profile Picture
    2 on at
    Hi everyone, 
     Do we have any solution on this?
     
    For me, its working from power automate but failing from Test tab and from Canvas app.
     
    Thanks,
    Saikat

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard