azure api management soap to rest feature - azure

I'm trying to expose my SOAP service as REST using azure API management SOAP to REST feature.
The WS imports, exposes my services and works fine, but all generated REST services are exposed with POST verb. When i try to change to verb GET the method GetUsers, for example, the content does not load (I receive an OK, but without content). When i try keeping the method with the POST verb, the content loads.
Is this possible? Can i change a HTTP verb from a originally SOAP service that was exposed as REST using Azure Management API?
Thanks.

You should be able to resolve that by adding set-method policy, so that when APIM receives GET request it changes method to POST before forwarding it to backend.

Add this to your API Management policy
<set-method>POST</set-method>

Related

How to use Azure API connector to register an user through signin-signup user-flow from an ASP.NET Core Web API?

I want to execute the signup user-flow in Azureb2c from an ASP.NET Core Web API instead of executing it from our frontend app. To achieve this I found an approach of using API connector.
The documentation of API-Connector says
You can use API connectors to integrate your sign-up user flows with REST APIs to customize the sign-up experience and integrate with external systems
I assume with this explanation that I can execute a user-flow defined in AzureB2C for signin-signup from a Web API as a Http Request. What that is not clear is how the API connector actually work. When we still are in development phase and want to execute the API-Connector (and execute the user-flow via this), what type of http request we are supposed to send? Will it contain the Id/password we had defined when creating the API-Connector along with the user-details that needs to be passed to signup user-flow? What the URL which we had added when creating the API-Connector will be used for?
Unfortunately there is not much data available on API-Connector apart from the Azure official documentation, which I felt a bit confusing.

Azure POST request redirect using Azure services

Hello I am trying to deploy my Azure Machine Learning pipeline with a REST endpoint. My problem is that I was able to generate an endpoint but has some sensitive information in it (ex: subscription id, resource group, etc). How can I generate a URL that forwards the request body to my Azure ML REST endpoint?
also, here is an approach I've done:
Used Application Gateway Redirect (this approach didn't forward the request body. It instead turned my POST request into a GET request when it redirected to the correct URL.)
The issue is raised because of some of the default security headers dependent on REST API and web based. Need to set the REST API CSP HEADER. Check the request and response headers in config file of the web application.

Can I setup a web hook for a Method in Azure Api Management?

So, I have an API in Azure-API-Management, which is attached to a function. I want to expose one the method in API as Web-hook for another application CRM. It will be an inbound web-hook.
Is it possible ?
A webhook endpoint is like any other HTTP endpoint that usually expects a POST request from an external system. So, yes.
Depending on the CRM Application, you could leverage APIMs built-in security features to authenticate the webhook call without having to validate credentials in your function as a bonus for using APIM.

Turning on Azure Mobile Service Authentication results in "Resource does not support GET" on a POST Request

I tried to implement custom Authentication via a authentication endpoint in an azure mobile app. I've created an Api Controller, that creates the Jwt using Azures AppServiceLoginHandler.CreateToken method. When I post to this controller with turned off Azure App Service Authentication, I get a token, but when I want to use it later, I always receive a "401 Unauthorized".
But when I turn the setting on in the Azure Portal, and send the very same request
I get:
The requested resource does not support http method 'GET'.
I'm not changing any code, and I'm certainly using a POST request - The exact same request, that works with turned off App Service Authentication.
My Code is essentially the same as here:
https://www.newventuresoftware.com/blog/custom-authentication-with-azure-mobile-apps
Could someone enlighten me here? Do I need additional configuration somewhere?
As adrian hall's book about Custom Authentication states as follows:
You must turn on Authentication / Authorization in your App Service. Set the Action to take when request is not authenticated to Allow Request (no action) and do not configure any of the supported authentication providers.
For custom authentication, you need to turn on the Authentication / Authorization in your app service for authenticating your token. Moreover, I would recommend you leverage fiddler to capture the network traces to narrow this issue. Additionally, you need to make sure that you send the custom login request with HTTPS. Details, you could follow this similar issue.

Azure API Management Operation URL Template

I am trying to create a simple, parameterless, web api endpoint managed by Azure API Management. My question is I when I add a paramaterless operation, what in the world is the URL template supposed to be? My endpoint is http://airport-api2.azurewebsites.net/api/airport. There are no parameters, the service works fine outside of API Management. I created an API Management and want to add this GET to my azurewebsites endpoint. What is the mandatory URL Template value I need to enter into the API Management portal to get this thing to work. The built in echo service uses /resource. I cannot find an example. thanks in advance
Create the API with these parameters
WebService URL : http://airport-api2.azurewebsites.net/api
WebAPi suffix url : whatyouwant
then configure the operation with
operation : /airport
Enjoy!

Resources