Calling Logic Apps from Azure API management is easy and a great way to bring some order to your APIs.

However, when you call a Logic App, it returns a lot of headers that contain information that you want to hide from your API consumers. In order to do that, simply add the following to your policy for outbound:

<outbound>


<base
/>


<set-header
name=“x-ms-tracking-id”
exists-action=“delete”
/>


<set-header
name=“x-ms-request-id”
exists-action=“delete”
/>


<set-header
name=“x-ms-workflow-run-id”
exists-action=“delete”
/>


<set-header
name=“x-ms-correlation-id”
exists-action=“delete”
/>


<set-header
name=“x-ms-client-tracking-id”
exists-action=“delete”
/>


<set-header
name=“x-ms-trigger-history-name”
exists-action=“delete”
/>


<set-header
name=“x-ms-execution-location”
exists-action=“delete”
/>


<set-header
name=“x-ms-workflow-id”
exists-action=“delete”
/>


<set-header
name=“x-ms-workflow-version”
exists-action=“delete”
/>


<set-header
name=“x-ms-workflow-name”
exists-action=“delete”
/>


<set-header
name=“x-ms-workflow-system-id”
exists-action=“delete”
/>


<set-header
name=“x-ms-ratelimit-burst-remaining-workflow-writes”
exists-action=“delete”
/>


<set-header
name=“x-ms-ratelimit-remaining-workflow-download-contentsize”
exists-action=“delete”
/>


<set-header
name=“x-ms-ratelimit-time-remaining-directapirequests”
exists-action=“delete”
/>


<set-header
name=“x-ms-ratelimit-remaining-workflow-upload-contentsize”
exists-action=“delete”
/>

</outbound>

 

If you want to, you can add it at the API level to override the headers for all operations, or you can set it at an even higher level. Just add it under All APIs just to be sure that you do not send Logic App headers back to the API consumer.