cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Azure Function App The data returned in the response is invalid

Hi team 🙂

I am a beginer in PowerApps so, I waste two days and cannot solve my problem.

I Create a basic Function App on Azure it returns a string:

FUNCTIONAPP.png

then I created my connection in PowerApps connection and tested it, everithing seems that is OK.

connection test.png

 

However when I Use my function in my app in the onselect of a button i receive an error:

error.png

 

my code on select button is:

onselect.png

 

I am trying to asign the string that i get from my function to "Azvar" variable, but it is not working,

the swagger file looks:

swagger.png

do you have any idea to fix this problem?

 

thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

well, after intensive research I didn't solve it I think that it is related on the way that PowerApps require the information, so to go ahead with my scenario, I change the strategy and now I am using Flow to invoke and get values exactly as Power Apps needs

 

flowresponse.pngI

I hope it helps someone else and if anybody knows a better solution, please share it 🙂

 

have a great one!

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Hi @JhonatanRS ,

Could you please share a bit more about the Response body JSON schema you specified in your Custom connector action?

Do you use API Key as Authentication way in your Customer connector?

 

Based on the OpenAPI definition file you provided, I could not find any error syntax error within it. Please check if you have provided proper Response JSON Schema withim your Custom connector action.

 

If you use API Key as Authentication way in your Custom connector, there is an known limit -- When using an API key, we recommend not testing the connector immediately after you create it. It can take a few minutes until the connector is ready to connect to the API.

https://docs.microsoft.com/en-us/connectors/custom-connectors/define-openapi-definition#test-the-con...

 

More details about creating a customer connector based on Azure Function, please check the following blog:

https://powerapps.microsoft.com/de-de/blog/using-azure-functions-in-powerapps/

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

well, after intensive research I didn't solve it I think that it is related on the way that PowerApps require the information, so to go ahead with my scenario, I change the strategy and now I am using Flow to invoke and get values exactly as Power Apps needs

 

flowresponse.pngI

I hope it helps someone else and if anybody knows a better solution, please share it 🙂

 

have a great one!

View solution in original post

Highlighted
Regular Visitor

I kept getting this same problem.

 

In the end I configured my Azure function to return the data in json e.g. {"CustomerStatus":"Valid"}

 

After updating the swagger file and importing into PowerApps I was able to get the data via 

[MyConnection].[InvokeAzureFunction](CustomerName).CustomerStatus

 

Hope this helps.

Highlighted

Great!! it is helpful! Thanks 7d3dev I'll try

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,430)