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/durable/durable-functions-configure-durable-functions-with-credentials.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
2
title: "Quickstart: Authenticate a Durable Functions app by using Microsoft Entra ID"
3
-
description: Authenticate a Durable Functions app in Azure Functions by using either managed identity credentials or client secret credentials in Microsoft Entra ID.
3
+
description: Authenticate a Durable Functions app in Azure Functions by using managed identity credentials or client secret credentials in Microsoft Entra ID.
4
4
author: naiyuantian
5
5
ms.topic: quickstart
6
-
ms.date: 02/01/2023
6
+
ms.date: 07/24/2024
7
7
ms.author: azfuncdf
8
8
---
9
9
@@ -56,26 +56,26 @@ Next, in the Azure portal, [assign](/entra/identity/managed-identities-azure-res
56
56
57
57
Before you can use your app's managed identity, make some changes to the app configuration:
58
58
59
-
1. In the Azure portal, in your function app resource menu under **Settings**, select **Configuration**.
59
+
1. In the Azure portal, on your function app resource menu under **Settings**, select **Configuration**.
60
60
61
61
1. In the list of settings, select **AzureWebJobsStorage** and select the **Delete** icon.
62
62
63
63
:::image type="content" source="media/durable-functions-configure-df-with-credentials/durable-functions-managed-identity-scenario-01.png" alt-text="Screenshot that shows default storage settings and deleting AzureWebJobsStorage." lightbox="media/durable-functions-configure-df-with-credentials/durable-functions-managed-identity-scenario-01.png":::
64
64
65
65
1. Add a setting to link your Azure storage account to the application.
66
66
67
-
Use *one of the following methods* depending on the cloud that your app runs in.
67
+
Use *one of the following methods* depending on the cloud that your app runs in:
68
68
69
69
***Azure cloud**: If your app runs in *public Azure*, add a setting that identifies an Azure storage account name:
***Non-Azure cloud**: If your application runs in a cloud outside of Azure, you must add a specific service URI (endpoint) for the storage account instead of an account name.
75
+
***Non-Azure cloud**: If your application runs in a cloud outside of Azure, you must add a specific service URI (an *endpoint*) for the storage account instead of an account name.
76
76
77
77
> [!NOTE]
78
-
> If you're using[Azure Government](../../azure-government/documentation-government-welcome.md) or any other cloud that's separate from public Azure, you must use the option to provide a specific service URL. For more information about using Azure Storage with Azure Government, see [Develop by using the Storage API in Azure Government](../../azure-government/documentation-government-get-started-connect-to-storage.md).
78
+
> If you use[Azure Government](../../azure-government/documentation-government-welcome.md) or any other cloud that's separate from public Azure, you must use the option to provide a specific service URI. For more information about using Azure Storage with Azure Government, see [Develop by using the Storage API in Azure Government](../../azure-government/documentation-government-get-started-connect-to-storage.md).
79
79
80
80
*`AzureWebJobsStorage__<blobServiceUri>`
81
81
@@ -89,7 +89,7 @@ Before you can use your app's managed identity, make some changes to the app con
You can get the values for these URI variables in the storage account on the **Endpoints** tab.
92
+
You can get the values for these URI variables in the storage account information on the **Endpoints** tab.
93
93
94
94
:::image type="content" source="media/durable-functions-configure-df-with-credentials/durable-functions-managed-identity-scenario-02.png" alt-text="Screenshot that shows an example of an endpoint as a specific service URI.":::
95
95
@@ -107,7 +107,7 @@ Before you can use your app's managed identity, make some changes to the app con
107
107
108
108
## Configure your app to use client secret credentials
109
109
110
-
Registering a client application in Microsoft Entra ID is another way that you can configure access to an Azure service for your Durable Functions app. In the following steps, you use client secret credentials for authentication to your Azure Storage account. Function apps can use this method both locally and in Azure. Using a client secret credential is *less recommended* than using managed identity credentials because a client secret is more complicated to configure and manage. A client secret credential also requires sharing a secret credential with the Azure Functions service.
110
+
Registering a client application in Microsoft Entra ID is another way you can configure access to an Azure service for your Durable Functions app. In the following steps, you use client secret credentials for authentication to your Azure Storage account. Function apps can use this method both locally and in Azure. Using a client secret credential is *less recommended* than using managed identity credentials because a client secret is more complicated to configure and manage. A client secret credential also requires sharing a secret credential with the Azure Functions service.
1. In the Azure portal, go to your function's storage account.
143
143
144
-
1.In the resource menu, select **Access Control (IAM)**, and then select **Add role assignment**.
144
+
1.On the resource menu, select **Access Control (IAM)**, and then select **Add role assignment**.
145
145
146
146
:::image type="content" source="media/durable-functions-configure-df-with-credentials/durable-functions-client-secret-scenario-02.png" alt-text="Screenshot that shows the Access control pane with Add role assignment highlighted." lightbox="media/durable-functions-configure-df-with-credentials/durable-functions-client-secret-scenario-02.png":::
147
147
148
-
1. Select the role you want to add, select **Next**, and then search for your application. Review the role, and then add the role.
148
+
1. Select a role to add, select **Next**, and then search for your application. Review the role assignment, and then add the role.
149
149
150
150
:::image type="content" source="media/durable-functions-configure-df-with-credentials/durable-functions-client-secret-scenario-03.png" alt-text="Screenshot that shows the role assignment pane." lightbox="media/durable-functions-configure-df-with-credentials/durable-functions-client-secret-scenario-03.png":::
151
151
152
152
### Configure the client secret
153
153
154
154
In the Azure portal, run and test the application. To run and test the app locally, specify the following settings in the function’s *local.settings.json* file.
155
155
156
-
1. In the Azure portal, in your function app resource menu under **Settings**, select **Configuration**.
156
+
1. In the Azure portal, on your function app resource menu under **Settings**, select **Configuration**.
157
157
158
158
1. In the list of settings, select **AzureWebJobsStorage** and select the **Delete** icon.
159
159
160
160
1. Add a setting to link your Azure storage account to the application.
161
161
162
-
Use *one of the following methods* depending on the cloud that your app runs in.
162
+
Use *one of the following methods* depending on the cloud that your app runs in:
163
163
164
164
***Azure cloud**: If your app runs in *public Azure*, add a setting that identifies an Azure storage account name:
***Non-Azure cloud**: If your application runs in a cloud outside of Azure, you must add a specific service URI (endpoint) for the storage account instead of an account name.
170
+
***Non-Azure cloud**: If your application runs in a cloud outside of Azure, you must add a specific service URI (an *endpoint*) for the storage account instead of an account name.
171
171
172
172
> [!NOTE]
173
-
> If you use [Azure Government](../../azure-government/documentation-government-welcome.md) or any other cloud that's separate from public Azure, you must use the option to provide a specific service URL. For more information about using Azure Storage with Azure Government, see [Develop by using the Storage API in Azure Government](../../azure-government/documentation-government-get-started-connect-to-storage.md).
173
+
> If you use [Azure Government](../../azure-government/documentation-government-welcome.md) or any other cloud that's separate from public Azure, you must use the option to provide a specific service URI. For more information about using Azure Storage with Azure Government, see [Develop by using the Storage API in Azure Government](../../azure-government/documentation-government-get-started-connect-to-storage.md).
174
174
175
175
*`AzureWebJobsStorage__<blobServiceUri>`
176
176
@@ -184,18 +184,18 @@ In the Azure portal, run and test the application. To run and test the app local
You can get the values for these URI variables in the storage account on the **Endpoints** tab.
187
+
You can get the values for these URI variables in the storage account information on the **Endpoints** tab.
188
188
189
189
:::image type="content" source="media/durable-functions-configure-df-with-credentials/durable-functions-managed-identity-scenario-02.png" alt-text="Screenshot that shows an example of an endpoint as a specific service URI." lightbox="media/durable-functions-configure-df-with-credentials/durable-functions-managed-identity-scenario-02.png":::
190
190
191
-
1. To add client secret credentials, specify the following values:
191
+
1. To add client secret credentials, set the following values:
192
192
193
193
***AzureWebJobsStorage__clientId**: Get this GUID value on the Microsoft Entra application pane.
194
194
195
195
***AzureWebJobsStorage__ClientSecret**: The secret value that you generated in the Microsoft Entra admin center in an earlier step.
196
196
197
197
***AzureWebJobsStorage__tenantId**: The tenant ID that the Microsoft Entra application is registered in. Get this GUID value on the Microsoft Entra application pane.
198
198
199
-
The values to use for the client ID and the tenant ID appear on your client application Overview pane. The client secret value is the one that you saved in an earlier step. The client secret value isn't available after the page is refreshed.
199
+
The values to use for the client ID and the tenant ID appear on your client application Overview pane. The client secret value is the one that you saved in an earlier step. The client secret value isn't available after the pane is refreshed.
200
200
201
201
:::image type="content" source="media/durable-functions-configure-df-with-credentials/durable-functions-client-secret-scenario-04.png" alt-text="Screenshot that shows the tenant ID and client ID on a Microsoft Entra application pane." lightbox="media/durable-functions-configure-df-with-credentials/durable-functions-client-secret-scenario-04.png":::
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/quickstart-mssql.md
+8-13Lines changed: 8 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Configure a Durable Functions app to use the Microsoft SQL Server (
4
4
author: davidmrdavid
5
5
ms.topic: quickstart
6
6
ms.custom: devx-track-dotnet
7
-
ms.date: 11/14/2022
7
+
ms.date: 07/24/2024
8
8
ms.reviewer: azfuncdf
9
9
---
10
10
@@ -43,12 +43,7 @@ If you don't meet these prerequisites, we recommend that you begin with one of t
43
43
> [!NOTE]
44
44
> If your app uses [Extension Bundles](../functions-bindings-register.md#extension-bundles), skip this section. Extension Bundles removes the need for manual extension management.
45
45
46
-
First, install the latest version of the MSSQL storage provider extension from NuGet. For .NET, you add a reference to the extension in your _.csproj_ file and build the project. You can also use the [dotnet add package](/dotnet/core/tools/dotnet-add-package) command to add extension packages.
47
-
48
-
Which extension package you install depends on the .NET worker you're using:
49
-
50
-
- For the _in-process_ .NET worker, install [Microsoft.DurableTask.SqlServer.AzureFunctions](https://www.nuget.org/packages/Microsoft.DurableTask.SqlServer.AzureFunctions).
51
-
- For the _isolated_ .NET worker, install [Microsoft.Azure.Functions.Worker.Extensions.DurableTask.SqlServer](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.DurableTask.SqlServer).
46
+
First, install the latest version of the [Microsoft.Azure.Functions.Worker.Extensions.DurableTask.SqlServer](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.DurableTask.SqlServer) MSSQL storage provider extension from NuGet. For .NET, you add a reference to the extension in your _.csproj_ file and then build the project. You can also use the [dotnet add package](/dotnet/core/tools/dotnet-add-package) command to add extension packages.
52
47
53
48
You can install the extension by using the following [Azure Functions Core Tools CLI](../functions-run-local.md#install-the-azure-functions-core-tools) command:
54
49
@@ -214,21 +209,21 @@ You can get your Azure SQL database's connection string by going to the database
214
209
215
210
Here's an example of how to get the Azure SQL connection string in the portal:
216
211
217
-

212
+
:::image type="content" source="media/quickstart-mssql/mssql-azure-db-connection-string.png" alt-text="Screenshot that shows an Azure connection string in the Azure portal.":::
218
213
219
214
In the Azure portal, the connection string has the database's password removed: it's replaced with `{your_password}`. Replace that placeholder with the password that you used to create the database earlier in this section. If you forgot your password, you can reset it by going to the database overview pane in the Azure portal. In the **Essentials** view, select your server name. Then, select **Reset password**. See the following screenshots for examples.
220
215
221
-

216
+
:::image type="content" source="media/quickstart-mssql/mssql-azure-reset-pass-1.png" alt-text="Screenshot that shows the Azure SQL database view, with the server name option highlighted.":::
222
217
223
-

218
+
:::image type="content" source="media/quickstart-mssql/mssql-azure-reset-pass-2.png" alt-text="Screenshot that shows the SQL Server view, where Reset password is visible.":::
224
219
225
220
### Add the connection string as an application setting
226
221
227
222
Next, add your database's connection string as an application setting. To add it in the Azure portal, first go to your Azure Functions app view. Under **Configuration**, select **New application setting**. Assign **SQLDB_Connection** to map to a publicly accessible connection string. See the following screenshots for examples.
228
223
229
-

224
+
:::image type="content" source="media/quickstart-mssql/mssql-azure-environment-variable-1.png" alt-text="Screenshot that shows the database pane and New application setting highlighted.":::
230
225
231
-

226
+
:::image type="content" source="media/quickstart-mssql/mssql-azure-environment-variable-2.png" alt-text="Screenshot that shows entering a connection string setting name and its value.":::
232
227
233
228
### Deploy
234
229
@@ -242,7 +237,7 @@ SELECT TOP 5 InstanceID, RuntimeStatus, CreatedTime, CompletedTime FROM dt.Insta
242
237
243
238
After you run a simple orchestrator, you should see at least one result, as shown in this example:
244
239
245
-

240
+
:::image type="content" source="media/quickstart-mssql/mssql-azure-db-check.png" alt-text="Screenshot that shows Azure SQL Query Editor results for the SQL query.":::
0 commit comments