Ershad Nozari
Ershad Nozari

Reputation: 667

Azure APIM custom connector returns empty body response in Power Apps

I’m going through the wizard to create a custom connector in Power Apps to call a simple Get operation in Azure APIM. I can call the API fine using Postman, Fiddler and CURL. However, when I try to test the connector using the test tab I’m getting a 200 OK but the response body is empty: enter image description here

It’s worth mentioning that this issue, with empty response body, occurs only for APIs in Azure APIM. If I hit the backend API, hosted in Azure App Service, without going through Azure APIM I’m receiving a response body. I have tested with other public APIs on the internet which works fine as well. The problem with empty response seems to have something to do with the integration between Power Apps and Azure APIM.

Any assistance is highly appreciated.

Upvotes: 0

Views: 994

Answers (1)

Ershad Nozari
Ershad Nozari

Reputation: 667

With the help of Azure Application Insights logs, I discovered that this is ralated to CORS. To resolve the issue, I added the https://flow.microsoft.com to Azure APIM CORS policy to allow calls from the PowerApps test console to come through, like so:

enter image description here

Upvotes: 1

Related Questions