You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-how-to-use-azure-function-app-settings.md
+40-30Lines changed: 40 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,27 +20,33 @@ Connection strings, environment variables, and other application settings are de
20
20
21
21
[!INCLUDE [Don't mix development environments](../../includes/functions-mixed-dev-environments.md)]
22
22
23
+
To view the app settings in your function app, follow these steps:
24
+
23
25
1. Sign in to the [Azure portal] using your Azure account. Search for your function app and select it.
24
26
25
-
2. In the left pane, expand **Settings**, and then select **Environment variables**.
27
+
2. In the left pane of your function app, expand **Settings**, select **Environment variables**, and then select the **App settings** tab.
26
28
27
-
:::image type="content" source="./media/functions-how-to-use-azure-function-app-settings/azure-function-app-main.png" alt-text="Screen shot that how to select the App settings page in a Function app.":::
29
+
:::image type="content" source="./media/functions-how-to-use-azure-function-app-settings/azure-function-app-main.png" alt-text="Screen shot that how to select the App settings page in a function app.":::
28
30
29
31
## <aname="settings"></a>Work with application settings
30
32
31
-
You can create any number of application settings required by your function code. There are also predefined application settings used by Azure Functions. For more information, see [App settings reference for Azure Functions](functions-app-settings.md).
33
+
In addition to the predefined app settings used by Azure Functions, you can create any number of app settings, as required by your function code. For more information, see [App settings reference for Azure Functions](functions-app-settings.md).
32
34
33
-
These settings are stored encrypted. For more information, see [Application settings security](security-concepts.md#application-settings).
35
+
These settings are stored encrypted. For more information, see [App settings security](security-concepts.md#application-settings).
34
36
35
-
You can manage application settings from the [Azure portal], (functions-how-to-use-azure-function-app-settings.md?tabs=portal#settings) and by using the [Azure CLI](functions-how-to-use-azure-function-app-settings.md?tabs=azurecli#settings) and [Azure PowerShell](functions-how-to-use-azure-function-app-settings.md?tabs=powershell#settings). You can also manage application settings from [Visual Studio Code](functions-develop-vs-code.md#application-settings-in-azure) and from [Visual Studio](functions-develop-vs.md#function-app-settings).
37
+
You can manage app settings from the [Azure portal](functions-how-to-use-azure-function-app-settings.md?tabs=portal#settings), and by using the [Azure CLI](functions-how-to-use-azure-function-app-settings.md?tabs=azurecli#settings) and [Azure PowerShell](functions-how-to-use-azure-function-app-settings.md?tabs=powershell#settings). You can also manage app settings from [Visual Studio Code](functions-develop-vs-code.md#application-settings-in-azure) and from [Visual Studio](functions-develop-vs.md#function-app-settings).
36
38
37
39
### [Azure portal](#tab/portal)
38
40
39
-
To find the application settings, see [Get started in the Azure portal](#get-started-in-the-azure-portal).
41
+
To view your app settings, see [Get started in the Azure portal](#get-started-in-the-azure-portal).
42
+
43
+
The **App settings** tab maintains settings that are used by your function app:
44
+
45
+
1. To see the values of the app settings, select **Show values**.
40
46
41
-
The **App settings** tab maintains settings that are used by your function app. To see the values of the app settings, select **Show values**. To add a setting, select **+ Add**, and then enter the **Name** and **Value** of the new key-value pair.
47
+
1. To add a setting, select **+ Add**, and then enter the **Name** and **Value** of the new key-value pair.
42
48
43
-
:::image type="content" source="./media/functions-how-to-use-azure-function-app-settings/azure-function-app-settings-tab.png" alt-text="Screen shot that shows the App settings page in a Function app.":::
49
+
:::image type="content" source="./media/functions-how-to-use-azure-function-app-settings/azure-function-app-settings-tab.png" alt-text="Screen shot that shows the App settings page in a function app.":::
44
50
45
51
### [Azure CLI](#tab/azure-cli)
46
52
@@ -83,7 +89,7 @@ When you develop a function app locally, you must maintain local copies of these
83
89
84
90
## FTPS deployment settings
85
91
86
-
Azure Functions supports deploying project code to your function app by using FTPS. Because this deployment method requires you to [sync triggers](functions-deployment-technologies.md#trigger-syncing), this method isn't recommended. To securely transfer project files, always use FTPS and not FTP.
92
+
Azure Functions supports deploying project code to your function app by using FTPS. Because this deployment method requires you to [sync triggers](functions-deployment-technologies.md#trigger-syncing), it isn't recommended. To securely transfer project files, always use FTPS and not FTP.
87
93
88
94
To get the credentials required for FTPS deployment, use one of these methods:
89
95
@@ -138,9 +144,11 @@ The following values indicate the plan type:
138
144
139
145
### [Azure portal](#tab/portal)
140
146
141
-
To determine the type of plan used by your function app, see **App Service plan** in the **Overview** page of the function app in the [Azure portal](https://portal.azure.com). To see the pricing tier, select the name of the **App Service Plan**, and then select **Settings > Properties** from the left pane.
147
+
To determine the type of plan used by your function app, see the **App Service Plan** in the **Overview** page of the function app in the [Azure portal](https://portal.azure.com).
142
148
143
-

149
+
To see the pricing tier, select the name of the **App Service Plan**, and then select **Settings > Properties** from the left pane.
150
+
151
+

144
152
145
153
### [Azure CLI](#tab/azure-cli)
146
154
@@ -233,7 +241,7 @@ Use the following procedure to migrate from a Consumption plan to a Premium plan
233
241
az functionapp update --name <MY_APP_NAME> --resource-group <MY_RESOURCE_GROUP> --plan <NEW_PREMIUM_PLAN>
234
242
```
235
243
236
-
1. When you no longer need the Consumption plan originally used by the app, delete your original plan after confirming you have successfully migrated to the new one. Run the [az functionapp plan list](/cli/azure/functionapp/plan#az-functionapp-plan-list) command as follows to get a list of all Consumption plans in your resource group:
244
+
1. When you no longer need the Consumption plan originally used by the app, delete your original plan after confirming you've successfully migrated to the new one. Run the [az functionapp plan list](/cli/azure/functionapp/plan#az-functionapp-plan-list) command as follows to get a list of all Consumption plans in your resource group:
237
245
238
246
```azurecli-interactive
239
247
az functionapp plan list --resource-group <MY_RESOURCE_GROUP> --query "[?sku.family=='Y'].{PlanName:name,Sites:numberOfSites}" -o table
@@ -355,7 +363,7 @@ HTTP triggered functions can generally be called by using a URL in the format: `
355
363
356
364
The **App keys** page appears. On this page the host keys are displayed, which can be used to access any function in the app. The system key is also displayed, which gives anyone administrator-level access to all function app APIs.
357
365
358
-
You can also practice least privilege by using the key for a specific function by selecting **Function keys** under **Developer** in your HTTPtriggered function.
366
+
You can also practice least privilege by using the key for a specific function. To do so, select **Function keys** under **Developer** in your HTTP-triggered function.
359
367
360
368
### [Azure CLI](#tab/azure-cli)
361
369
@@ -397,32 +405,34 @@ Consider these limitations when you develop your functions in the [Azure portal]
397
405
+ When you deploy code to a function app from outside the portal, you can no longer edit any of the code for that function app in the Azure portal. In this case, just continue using [local development](functions-develop-local.md).
398
406
+ For compiled C# functions and Java functions, you can create the function app and related resources in the portal. However, you must create the functions code project locally and then publish it to Azure.
399
407
400
-
When possible, you should develop your functions locally and publish your code project to a function app in Azure. For more information, see [Code and test Azure Functions locally](functions-develop-local.md).
408
+
When possible, develop your functions locally and publish your code project to a function app in Azure. For more information, see [Code and test Azure Functions locally](functions-develop-local.md).
401
409
402
410
## Manually install extensions
403
411
404
-
C# class library functions can include the NuGet packages for [binding extensions](functions-bindings-register.md) directly in the class library project. For other non-.NET languages and C# script, you should [use extension bundles](functions-bindings-register.md#extension-bundles). If you must manually install extensions, you can do so by [using Azure Functions Core Tools](./functions-core-tools-reference.md#func-extensions-install) locally. If you can't use extension bundles and are only able to work in the portal, you need to use [Advanced Tools (Kudu)](#kudu) to manually create the extensions.csproj file directly in the site. Make sure to first remove the `extensionBundle` element from the host.json file.
412
+
C# class library functions can include the NuGet packages for [binding extensions](functions-bindings-register.md) directly in the class library project. For other non-.NET languages and C# script, you should [use extension bundles](functions-bindings-register.md#extension-bundles). If you must manually install extensions, you can do so by [using Azure Functions Core Tools](./functions-core-tools-reference.md#func-extensions-install) locally. If you can't use extension bundles and are only able to work in the portal, you need to use [Advanced Tools (Kudu)](#kudu) to manually create the extensions.csproj file directly in the site. Make sure to first remove the `extensionBundle` element from the *host.json* file.
405
413
406
414
This same process works for any other file you need to add to your app.
407
415
408
416
> [!IMPORTANT]
409
417
> When possible, don't edit files directly in your function app in Azure. We recommend [downloading your app files locally](deployment-zip-push.md#download-your-function-app-files), using [Core Tools to install extensions](./functions-core-tools-reference.md#func-extensions-install) and other packages, validating your changes, and then [republishing your app using Core Tools](functions-run-local.md#publish) or one of the other [supported deployment methods](functions-deployment-technologies.md#deployment-methods).
410
418
411
-
The Functions editor built into the Azure portal lets you update your function code and configuration files directly in the portal.
419
+
The Functions editor built into the Azure portal lets you update your function code and configuration files directly in the portal:
420
+
421
+
1. Select your function app, then under **Functions**, select **Functions**.
412
422
413
-
1. Select your function app, then under **Functions** select **Functions**.
414
423
1. Choose your function and select **Code + test** under **Developer**.
424
+
415
425
1. Choose your file to edit and select **Save** when you finish.
416
426
417
-
Files in the root of the app, such as function.proj or extensions.csproj need to be created and edited by using the [Advanced Tools (Kudu)](#kudu).
427
+
Files in the root of the app, such as function.proj or extensions.csproj need to be created and edited by using the [Advanced Tools (Kudu)](#kudu):
418
428
419
429
1. Select your function app, expand **Development tools**, and then select **Advanced tools** > **Go**.
420
430
1. If prompted, sign in to the Source Control Manager (SCM) site with your Azure credentials.
421
431
1. From the **Debug console** menu, choose **CMD**.
422
432
1. Navigate to `.\site\wwwroot`, select the plus (**+**) button at the top, and select **New file**.
423
-
1.Name the file, such as `extensions.csproj` and press Enter.
424
-
1. Select the edit button next to the new file, add or update code in the file, and select **Save**.
425
-
1. For a project file like extensions.csproj, run the following command to rebuild the extensions project:
433
+
1.Give the file a name, such as `extensions.csproj`, and then press Enter.
434
+
1. Select the edit button next to the new file, add or update code in the file, and then select **Save**.
435
+
1. For a project file like *extensions.csproj*, run the following command to rebuild the extensions project:
426
436
427
437
```bash
428
438
dotnet build extensions.csproj
@@ -454,25 +464,25 @@ For more information about how to work with App Service settings, see [Configure
454
464
455
465
### <a name="editor"></a>App Service editor
456
466
457
-

467
+

458
468
459
469
The App Service editor is an advanced in-portal editor that you can use to modify JSON configuration files and code files alike. Choosing this option launches a separate browser tab with a basic editor. This editor enables you to integrate with the Git repository, run and debug code, and modify function app settings. This editor provides an enhanced development environment for your functions compared with the built-in function editor.
460
470
461
471
We recommend that you consider developing your functions on your local computer. When you develop locally and publish to Azure, your project files are read-only in the portal. For more information, see [Code and test Azure Functions locally](functions-develop-local.md).

466
476
467
477
The in-portal console is an ideal developer tool when you prefer to interact with your function app from the command line. Common commands include directory and file creation and navigation, as well as executing batch files and scripts.
468
478
469
479
When developing locally, we recommend using the [Azure Functions Core Tools](functions-run-local.md) and the [Azure CLI].
The advanced tools for App Service (also known as Kudu) provide access to advanced administrative features of your functionapp. From Kudu, you manage system information, app settings, environment variables, site extensions, HTTP headers, and server variables. You can also launch **Kudu** by browsing to the SCM endpoint for your functionapp, for example: `https://<myfunctionapp>.scm.azurewebsites.net/`.
474
484
475
-
The advanced tools for App Service (also known as Kudu) provide access to advanced administrative features of your function app. From Kudu, you manage system information, app settings, environment variables, site extensions, HTTP headers, and server variables. You can also launch **Kudu** by browsing to the SCM endpoint for your functionapp, like `https://<myfunctionapp>.scm.azurewebsites.net/`
485
+

476
486
477
487
### <a name="deployment"></a>Deployment Center
478
488
@@ -486,9 +496,9 @@ To prevent malicious code execution on the client, modern browsers block request
486
496
487
497
When you configure the **Allowed origins** list for your function app, the `Access-Control-Allow-Origin` header is automatically added to all responses from HTTP endpoints in your function app.
488
498
489
-

499
+

490
500
491
-
The wildcard (\*) is ignoredif there's another domain entry.
501
+
If there's another domain entry, the wildcard (\*) is ignored.
492
502
493
503
#### [Azure CLI](#tab/azure-cli)
494
504
@@ -510,13 +520,13 @@ You can't currently update CORS settings using Azure PowerShell.
510
520
511
521
### <a name="auth"></a>Authentication
512
522
513
-

523
+
When functions use an HTTP trigger, you can require calls to first be authenticated. App Service supports Microsoft Entra authentication and sign-in with social providers, such as Facebook, Microsoft, and Twitter. For information about configuring specific authentication providers, see [Azure App Service authentication overview](../app-service/overview-authentication-authorization.md).
514
524
515
-
When functions use an HTTP trigger, you can require calls to first be authenticated. App Service supports Microsoft Entra authentication and sign-in with social providers, such as Facebook, Microsoft, and Twitter. For details on configuring specific authentication providers, see [Azure App Service authentication overview](../app-service/overview-authentication-authorization.md).
525
+

516
526
517
527
## Related content
518
528
519
-
+ [Configure Azure App Service Settings](../app-service/configure-common.md)
529
+
+ [Configure an App Service app](../app-service/configure-common.md)
520
530
+ [Continuous deployment for Azure Functions](functions-continuous-deployment.md)
Copy file name to clipboardExpand all lines: includes/functions-environment-variables.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,17 @@
2
2
title: include file
3
3
description: include file
4
4
author: ggailey777
5
+
ms.author: glenga
5
6
ms.service: azure-functions
6
7
ms.topic: include
7
-
ms.date: 05/08/2019
8
-
ms.author: glenga
8
+
ms.date: 07/01/2024
9
9
ms.custom: include file
10
10
---
11
11
12
-
The function app settings values can also be read in your code as environment variables. For more information, see the Environment variables section of these language-specific reference topics:
12
+
The function app settings values can also be read in your code as environment variables. For more information, see the Environment variables section of these language-specific reference articles:
0 commit comments