FunctionApp Without key ?

David M 236 Reputation points
2025-06-05T12:57:28.5166667+00:00

Hello,

I have several services FunctionApp in my Azure Portal.
Some services all require a key when called (the URL provided by "Get Function URL"), and other services don't provide this token even though a "Default" key is listed in "Function Key".
User's image

User's image

How can I always have the required key for my functions?

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

1 answer

Sort by: Most helpful
  1. Ranashekar Guda 2,820 Reputation points Microsoft External Staff Moderator
    2025-06-05T20:30:53.69+00:00

    Hello @David M,
    It sounds like you're experiencing some confusion regarding the use of access keys in your Azure Function Apps. Here’s a breakdown of how you can ensure that you always have the required key when calling your functions:

    Understand Access Levels: First, make sure you're aware of the authorization levels set for your functions. If a function is set to require a key (like function or admin), it won't respond to requests without the appropriate key.

    Default Keys: You mentioned seeing a "Default" key in the Function Key section. This key should be used when calling functions that do not allow anonymous access. You can provide this key either in the query string (i.e., ?code=<your_key>) or in the request header (i.e., x-functions-key: <your_key>).

    Managing Keys: If you need consistent access to a certain function, you can create a new function key specifically for that function. Go to your function app in the Azure portal, find the Function Keys section, and create a new key. This key can then be used for your API calls.

    Environment Variables: Consider storing your keys securely using Azure Key Vault or environment variables in your application settings to avoid hardcoding them within your application.

    Temporary Keys: If you have set the function to require a key temporarily and want to change it, you can do this directly through the Azure portal. Just navigate to the settings of the specific function.

    Check API Management Integration: If your Azure Function is exposed more widely, you might consider using Azure API Management, which can manage keys and provide an additional layer of security and usability.

    Kindly refer below links:

    Work with access keys in Azure Functions

    Authorization level

    Hope this helps. Do let us know if you any further queries.

    0 comments No comments

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.