Azure function fails when called via "Azure Function" but succeeds when called via "Web" in ADF

Nem Lasica 0 Reputation points
2023-01-15T23:21:35.0066667+00:00

I have deployed an Azure function that runs successfully when tested from within the Azure Function App portal (Code + Test), Postman as well as the Web activity inside ADF, however, it consistently fails when called via the Azure Function activity with the below error:

**
Call to provided Azure function 'xxx' failed with status-'Unauthorized' while invoking 'POST' on 'https://xxx.azurewebsites.net' and message - 'Invoking Azure function failed with HttpStatusCode - Unauthorized.'.**

The function authorization level is set to "Function" and when calling the function via the Azure Function activity in ADF I provide the function (tried both, master and default) key via "x-functions-key" in the headers, yet it continues to fail.

Any ideas? Thanks!

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
6,336 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,617 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Silvia Wibowo 156 Reputation points Microsoft Employee
    2023-01-16T02:12:44.8233333+00:00