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 / Power Apps / The Data return in the...
Power Apps
Answered

The Data return in the response is invalid, Response data should be a valid JSON object

(0) ShareShare
ReportReport
Posted on by 9

Hi All,

I have created a SAP ODATA API as a custom connector to use in PowerApps .

 

That works fine and gives the response as given below:

Request:

SivaRudra_2-1595871034878.png

 

Gives the response correctly I have validated the JSON:

 

SivaRudra_1-1595870985896.png

While calling PowerAPPs: getting the below error:

Function calling in PowerAPPs:  Set(Testing,GetAllTimeEntry.GetTECollection().d.results)

Error: The Data return in the response is invalid, Response data should be a valid JSON object

 

Can some help me here to resolve this error. 

Categories:
  • Verified answer
    SivaRudra Profile Picture
    9 on at

    I have resolved myself. Now I can see the data flowing in correctly.

     

    The problem Accept (Accept application.json) was not declared in the header. If this is not declared then the data returns as XML format.  I have added this(Accept application.json) in the request header in the customer connector.

  • alrezac Profile Picture
    Microsoft Employee on at

    Hi,

     

    Thanks for your follow up post! Hopefully this will prove to be useful to future communities users.

     

    Regards,

     

    Alex

     

    -------

     

    Community Support Team _ Alex Rezac
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • WijkagentBraum Profile Picture
    31 on at

    For anyone finding this same issue, the detailed instructions to solve:

     

    In your Custom Connector, under Definition (3) create a new Policy.

    Give it the best name you can come up with and choose the template Set HTTP header

    Leave operations blank to apply to all operations.

    Header name:  Accept

    Header value: application/json

    Action if header exists: append

    Run policy on: Request

    Hopefully everyone can get their connectors to work this way!

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard