|
2 | 2 | title: Tutorial - Use identity-based connections instead of secrets with triggers and bindings
|
3 | 3 | description: Learn how to use identity-based connections instead of connection strings with a Service Bus queue trigger, and how to use managed identities locally.
|
4 | 4 | ms.topic: tutorial
|
5 |
| -ms.date: 10/20/21 |
| 5 | +ms.date: 10/20/2021 |
6 | 6 | #Customer intent: As a function developer, I want to learn how to use managed identities so that I can avoid having to handle connection strings in my application settings.
|
7 | 7 | ---
|
8 | 8 |
|
9 | 9 | # Tutorial: Use identity-based connections instead of secrets with triggers and bindings
|
10 | 10 |
|
11 |
| -This tutorial shows you how to configure Azure Functions to trigger off of Azure Service Bus queues using managed identities instead of secrets stored in the function app settings. The tutorial is a continuation of the [Functions managed identity tutorial](./functions-managed-identity-tutorial.md). To learn more about identity-based connections, see [Configure an identity-based connection.](functions-reference.md#configure-an-identity-based-connection). |
| 11 | +This tutorial shows you how to configure Azure Functions to trigger off of Azure Service Bus queues using managed identities instead of secrets stored in the function app settings. The tutorial is a continuation of the [Create a function app without default storage secrets in its definition][previous tutorial] tutorial. To learn more about identity-based connections, see [Configure an identity-based connection.](functions-reference.md#configure-an-identity-based-connection). |
12 | 12 |
|
13 | 13 | While the procedures shown work generally for all languages, this tutorial currently supports C# class library functions on Windows specifically.
|
14 | 14 |
|
@@ -100,8 +100,6 @@ You've granted your function app access to the service bus namespace using manag
|
100 | 100 | | ------------ | ---------------- | ----------- |
|
101 | 101 | | **ServiceBusConnection__fullyQualifiedNamespace** | <SERVICE_BUS_NAMESPACE>.servicebus.windows.net | This setting connections your function app to the Service Bus use identity-based connections instead of secrets. |
|
102 | 102 |
|
103 |
| - To learn more, see [Connection properties](functions-reference.md#connection-properties). |
104 |
| - |
105 | 103 | 1. After you create the two settings, select **Save** > **Confirm**.
|
106 | 104 |
|
107 | 105 | Now that you've prepared the function app to connect to the service bus namespace using a managed identity, you can add a new function that uses a Service Bus trigger to your local project.
|
@@ -154,7 +152,7 @@ Now that you've prepared the function app to connect to the service bus namespac
|
154 | 152 | This code sample updates the queue name to `myinputqueue`, which is the same name as you queue you created earlier. It also sets the name of the Service Bus connection to `ServiceBusConnection`. This is the Service Bus namespace used by the identity-based connection `ServiceBusConnection__fullyQualifiedNamespace` you configured in the portal.
|
155 | 153 |
|
156 | 154 | > [!NOTE]
|
157 |
| -> If you try to run your functions now using `func start` you'll receive an error. This is because you don't have an identity-based connection defined locally. If you want to run your function locally, set the app setting `ServiceBusConnection__fullyQualifiedNamespace` in `local.settings.json` as you did in [the previous section](#connect-to-service-bus-in-your-function-app). In addition, you'll need to assign the role to your developer identity. For more details, please refer to the [local development with identity-based connections documentation](./functions-reference#local-development-with-identity-based-connections). |
| 155 | +> If you try to run your functions now using `func start` you'll receive an error. This is because you don't have an identity-based connection defined locally. If you want to run your function locally, set the app setting `ServiceBusConnection__fullyQualifiedNamespace` in `local.settings.json` as you did in [the previous section](#connect-to-service-bus-in-your-function-app). In addition, you'll need to assign the role to your developer identity. For more details, please refer to the [local development with identity-based connections documentation](./functions-reference.md#local-development-with-identity-based-connections). |
158 | 156 |
|
159 | 157 | ## Publish the updated project
|
160 | 158 |
|
@@ -204,7 +202,6 @@ Use the following links to learn more Azure Functions with identity-based connec
|
204 | 202 |
|
205 | 203 | - [Managed identity in Azure Functions](../app-service/overview-managed-identity.md)
|
206 | 204 | - [identity-based connections in Azure Functions](./functions-reference.md#configure-an-identity-based-connection)
|
207 |
| -- [Connecting to host storage with an Identity](./functions-reference.md#connecting-to-host-storage-with-an-identity) |
208 | 205 | - [Functions documentation for local development](./functions-reference.md#local-development-with-identity-based-connections)
|
209 | 206 |
|
210 |
| -[previous tutorial]: functions-managed-identity-tutorial.md |
| 207 | +[previous tutorial]: ./functions-identity-based-connections-tutorial.md |
0 commit comments