Configuring Secrets and Keys

Learn how to configure access keys in Azure Functions to ensure authorized access.

When our function app has endpoints exposed to the outside world, such as HTTP triggers, we need to make sure that only authorized clients can access it. The standard mechanism for enabling this in Azure Functions is the use of secret keys. This way, the function endpoint will only be accessible to those clients that have specified the correct key-value pair in the request.

There are two main types of keys supported by Azure Functions:

  • Application key: It allows the client to access any function endpoints within the application.

  • Function key: It allows the client to access a specific function endpoint within the application.

Either of these keys can be placed in the query string of the URL as follows:

Get hands-on with 1400+ tech skills courses.