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
Hope this helps. Do let us know if you any further queries.