Why does telemetry show multiple 401 errors when calling /admin/host/drain

Brian Kuhn 0 Reputation points Microsoft Employee
2024-09-16T18:54:35.6133333+00:00

I have deployed an Azure dotnet 8 isolated function app to a Linux Flex Consumption plan. Function application runs correctly, but when I examine the application insights telemetry, I am seeing a large number of errors; all of them for the POST /admin/host/drain operation.

User's image

Example transaction:
User's image

The Admin API documentation indicates that hitting the URLs require the functions' master key to be passed in the header as x-functions-key. I am not making these calls, I believe they are being performed by the flex consumption plan scaler.

How do I configure my function application such that the admin api calls are authenticated successfully?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,992 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.