I have problem with triggering Azure function which returns 403 (HTTP trigger).
Trigger is initiated using Azure Data Factory.
It is important to mention that function is exposed through Azure APIM (API management) - function internally has restriction set in a way that only APIM IP is allowed to trigger the function.
Funny thing is that if I send ‘manual’ trigger (postman, HTTP call through APIM from my local machine) everything works as expected - I’m able to trigger the function.
If the same request is sent via Azure DataFactory 403 is returned. Like the request never leaves Azure and IP that hits the function is not the APIM IP. Is this possible and if yes, how to solve this?
Function, APIM and DataFactory are in the same Azure subscription.
FYI - 403 is coming from the function itself, not the APIM. If I remove access restriction from the function, everything works as expected.
Also, to make sure that the request goes through APIM, for one of the tests I put wrong APIM subscription key and this time when ADF triggered the function I got 403, but from APIM which means that requests goes for sure through gateway.



