We have an application running on azure virtual machine that doesn't have a public ip address.
We connect to VMs and other services on azure using existing VPN connection as established by the admin.
That application on the virtual machine exposes the back-end functionalities using REST API.
Testing the same using curl or api testing tool like Postman is successful as shown in below image:
Note above image is testing the api exposed from Virtual machine application directly.
Now, we want to expose the api through azure apim. We have done the configuration as shown in image below:
If we test it in apim with same parameters that worked when we tested api directly show this:
It shows testing successful with 200 response code. However, we dont get the actual response like "user has successfully logged in". Even if we pass wrong parameters that should not be successful, it still shows successful with 200 response code.
We tested using curl command and also postman and got 200 response code:
It doesn't matter what parameters we pass, it gives 200 response code. Not sure what we are missing, can someone please suggest?
I am attaching a document which shows the complete trace output.
191409-apim-trace.pdf
Thanks in advance