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"
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.
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.
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:
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.
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 .
If I click on "edit" in the "key-body-output" I have this:
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.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.