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 / Power BI custom connec...
Power Apps
Unanswered

Power BI custom connector not able to hande 202 response "The data returned in the response is invalid"

(0) ShareShare
ReportReport
Posted on by

I have a Power BI custom connector to refresh datasets and developed my app to get the groups, the datasets and finally post the refresh. The GET methods work correctly but when I POST the refresh, although it works correctly, I get a message saying "CustomAPIName.RefreshGroupDataset failed: The data returned in the response is invalid"


Error.PNG

In the custom connector test I see that I'm receiving a 202 response which means accepted but the response comes with no body info and apparently PowerApps is not handling correctly the response. 

202.PNG

I've tried to ClearCollect and Set a variable to catch the response but no luck. I've tried also importing the response into the custom connector and variations of the header but same result. In terms of functionality, the app works, however is annoying to get that error message, specially for the user. 

Method.PNG

 

 

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @Anonymous ,

    Could you please share more details about the Response Body you defined in your Custom connector for the "RefreshGroupDataset" action?

     Do you call the "Datasets - Refresh Dataset In Group" Power BI Rest API within your custom connector?

     

    If you call the "Datasets - Refresh Dataset In Group" Power BI Rest API within your custom connector, you should not define a Response Body Payload for the corresponding action. For "Datasets - Refresh Dataset In Group" Power BI Rest API, there is no Response boay payload required, please check the following article for more details:

    https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdatasetingroup

     

    If you defined a Response Body Payload for the corresponding action in your custom connector, please consider remove the Response Body payload (JSON schema) from your custom connector, then re-publish your custom connector, then re-create a new connection to your custom connector within your app, then try the CustomAPIName.RefreshGroupDataset() function again, check if the issue is solved.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    on at

    Hi, thanks for your reply. I have 3 methods in my custom connector: 

    GetGroups - To collect the Workspaces from PowerBI

    GetDatasets - To collect the datasets from a given workspace

    RefreshGroupDataset - To post a group and a dataset to be refreshed in PowerBI

     

    The first two methods work OK and I use them in my app fro the 3rd method. In the 3rd method "RefreshGroupDataset" I just set up a default response with the 202 as the name, no headers and no body. By default it adds a "*key-body-output" field but it is empty.  I tried this with no luck. Afterwards I tried importing from an example, which only gives headers and still didn't work. 

     

    I edited this image to show the names in english . 

    202 response.png

     

     

    If I click on "edit" in the "key-body-output" I have this: 

    schema properties.png

     

    I have no title nor description. The method works and the dataset is indeed refresh, it is just the response what powerApps is not catching correctly. Hope this information helps. 

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard