Skip to content

Commit b79a164

Browse files
authored
Merge pull request #314669 from ggailey777/paulyuk-fixup
[Functions] UAMI updates from PaulYuk's agents
2 parents 8aed47d + 77acdc6 commit b79a164

6 files changed

Lines changed: 296 additions & 102 deletions

articles/azure-functions/functions-bindings-cosmosdb-v2-trigger.md

Lines changed: 170 additions & 43 deletions
Large diffs are not rendered by default.

articles/azure-functions/functions-bindings-event-iot-trigger.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ This article explains how to work with Azure Functions bindings for IoT Hub. The
1414
For information on setup and configuration details, see the [overview](functions-bindings-event-iot.md).
1515

1616
> [!IMPORTANT]
17-
> While the following code samples use the Event Hub API, the given syntax is applicable for IoT Hub functions.
17+
> While the following code samples use the Event Hubs API, the given syntax is applicable for IoT Hub functions.
1818
1919
[!INCLUDE [functions-bindings-event-hubs](../../includes/functions-bindings-event-hubs-trigger.md)]
2020

2121
## Connections
2222

23-
The `connection` property is a reference to environment configuration that contains name of an application setting containing a connection string. You can get this connection string by selecting the **Connection Information** button for the [namespace](../event-hubs/event-hubs-create.md#create-an-event-hubs-namespace). The connection string must be for an Event Hubs namespace, not the event hub itself.
23+
The `connection` property references environment configuration that contains the name of an application setting with a connection string. You get this connection string by selecting the **Connection Information** button for the [namespace](../event-hubs/event-hubs-create.md#create-an-event-hubs-namespace). The connection string must be for an Event Hubs namespace, not the event hub itself.
2424

25-
The connection string must have at least "read" permissions to activate the function.
25+
The connection string must have at least **read** permissions to activate the function.
2626

27-
This connection string should be stored in an application setting with a name matching the value specified by the `connection` property of the binding configuration.
27+
Store this connection string in an application setting with a name that matches the value you specify in the `connection` property of the binding configuration.
2828

2929
> [!NOTE]
30-
> Identity-based connections aren't supported by the IoT Hub trigger. If you need to use managed identities end-to-end, you can instead use IoT Hub Routing to send data to an event hub you control. In that way, outbound routing can be authenticated with managed identity the event can be read [from that event hub using managed identity](functions-bindings-event-hubs-trigger.md?tabs=extensionv5#identity-based-connections).
30+
> The IoT Hub trigger doesn't support identity-based connections. If you need to use managed identities end-to-end, you can instead use IoT Hub Routing to send data to an event hub you control. In that way, outbound routing can be authenticated by using managed identity and the event is read [from that event hub using managed identity](functions-bindings-event-hubs-trigger.md?tabs=identity-based#connections).
3131
3232
## host.json properties
3333

34-
The [host.json](functions-host-json.md#eventhub) file contains settings that control Event Hub trigger behavior. See the [host.json settings](functions-bindings-event-iot.md#hostjson-settings) section for details regarding available settings.
34+
The [host.json](functions-host-json.md#eventhub) file contains settings that control Event Hubs trigger behavior. See the [host.json settings](functions-bindings-event-iot.md#hostjson-settings) section for details regarding available settings.
3535

3636
## Next steps
3737

articles/azure-functions/functions-create-vnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Create the queue where your Azure Functions Service Bus trigger gets events:
197197
1. Select **Create**.
198198

199199
> [!IMPORTANT]
200-
> This tutorial currently shows you how to connect to Service Bus using a connection string, which requires you to handle a share secret. For improved security, you should instead use managed identities when connecting to Service Bus from your app. For more information, see [Identity-based connections](functions-bindings-service-bus-trigger.md?tabs=extensionv5#identity-based-connections) in the Service Bus binding reference article.
200+
> This tutorial currently shows you how to connect to Service Bus using a connection string, which requires you to handle a share secret. For improved security, you should instead use managed identities when connecting to Service Bus from your app. For more information, see [Identity-based connections](functions-bindings-service-bus-trigger.md?tabs=identity-based#connections) in the Service Bus binding reference article.
201201
202202
## Get a Service Bus connection string
203203

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,61 @@
11
---
2-
author: mattchenderson
2+
author: ggailey777
33
ms.service: azure-functions
44
ms.topic: include
5-
ms.date: 11/12/2021
6-
ms.author: mahender
5+
ms.date: 04/13/2026
6+
ms.author: glenga
77
ms.custom: sfi-ropc-nochange
88
---
99

1010
## Connections
1111

12-
The `connectionStringSetting`/`connection` and `leaseConnectionStringSetting`/`leaseConnection` properties are references to environment configuration which specifies how the app should connect to Azure Cosmos DB. They may specify:
12+
The `connectionStringSetting`/`connection` and `leaseConnectionStringSetting`/`leaseConnection` properties reference environment configuration that specifies how the app connects to Azure Cosmos DB. They can specify:
1313

14-
- The name of an application setting containing a [connection string](#connection-string)
15-
- The name of a shared prefix for multiple application settings, together defining an [identity-based connection](#identity-based-connections). This option is only available for the `connection` and `leaseConnection` versions from [version 4.x or higher of the extension].
14+
- The name of an application setting containing a connection string.
15+
- The name of a shared prefix for multiple application settings, which together define a managed identity connection. This option is only available for the `connection` and `leaseConnection` versions from [version 4.x or higher of the extension].
1616

1717
If the configured value is both an exact match for a single setting and a prefix match for other settings, the exact match is used.
1818

19-
### Connection string
19+
> [!TIP]
20+
> Managed identity connections are recommended over connection strings for improved security. Connection strings include credentials that could be exposed, while managed identities eliminate the need to manage secrets.
2021
21-
The connection string for your database account should be stored in an application setting with a name matching the value specified by the connection property of the binding configuration.
22+
### [Managed identity](#tab/identity-based)
2223

23-
### Identity-based connections
24+
If you're using [version 4.x or higher of the extension], instead of using a connection string with a secret, you can have the app use a [Microsoft Entra identity](../articles/active-directory/fundamentals/active-directory-whatis.md). To do this, define settings under a common prefix that maps to the connection property in the trigger and binding configuration.
2425

25-
If you are using [version 4.x or higher of the extension], instead of using a connection string with a secret, you can have the app use a [Microsoft Entra identity](../articles/active-directory/fundamentals/active-directory-whatis.md). To do this, you would define settings under a common prefix which maps to the connection property in the trigger and binding configuration.
26+
In this mode, the extension requires the following application settings:
2627

27-
In this mode, the extension requires the following properties:
28+
| Template-based setting | Description | Identity type |
29+
| --- | --- | --- |
30+
| `<CONNECTION_NAME_PREFIX>__accountEndpoint` | The Azure Cosmos DB account endpoint URI. | System-assigned or user-assigned |
31+
| `<CONNECTION_NAME_PREFIX>__credential` | Must be set to `managedidentity`. | User-assigned |
32+
| `<CONNECTION_NAME_PREFIX>__clientId` | The client ID of the user-assigned managed identity. | User-assigned |
2833

29-
| Property | Environment variable template | Description | Example value |
30-
|---------------------------|-----------------------------------------------------|--------------------------------------------|------------------------------------------------|
31-
| Account Endpoint | `<CONNECTION_NAME_PREFIX>__accountEndpoint` | The Azure Cosmos DB account endpoint URI. | https://<database_account_name>.documents.azure.com:443/ |
34+
The value that you replace `<CONNECTION_NAME_PREFIX>` with is treated by the binding extension as the name of the connection setting.
3235

33-
Additional properties may be set to customize the connection. See [Common properties for identity-based connections](../articles/azure-functions/functions-reference.md#common-properties-for-identity-based-connections).
36+
For example, if your binding configuration specifies `connection = "CosmosDBConnection"` with a user-assigned managed identity, configure the following application settings:
37+
38+
```json
39+
{
40+
"CosmosDBConnection__accountEndpoint": "https://mycosmosdb.documents.azure.com:443/",
41+
"CosmosDBConnection__credential": "managedidentity",
42+
"CosmosDBConnection__clientId": "00000000-0000-0000-0000-000000000000"
43+
}
44+
```
45+
46+
> [!TIP]
47+
> Use user-assigned managed identities for production scenarios where you need fine-grained control over identity permissions across multiple resources.
48+
49+
You can use additional settings in the template to further customize the connection. See [Common properties for identity-based connections](../articles/azure-functions/functions-reference.md#common-properties-for-identity-based-connections).
3450

3551
[!INCLUDE [functions-identity-based-connections-configuration](./functions-identity-based-connections-configuration.md)]
3652

3753
[!INCLUDE [functions-cosmos-permissions](./functions-cosmos-permissions.md)]
3854

55+
### [Connection string](#tab/connection-string)
56+
57+
Store the connection string for your database account in an application setting with a name that matches the value you specify in the connection property of the binding configuration.
58+
59+
---
60+
3961
[version 4.x or higher of the extension]: ../articles/azure-functions/functions-bindings-cosmosdb-v2.md?tabs=extensionv4
Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,67 @@
11
---
2-
author: mattchenderson
2+
author: ggailey777
33
ms.service: azure-functions
44
ms.topic: include
5-
ms.date: 10/08/2021
6-
ms.author: mahender
5+
ms.date: 04/13/2026
6+
ms.author: glenga
77
---
88

99
## Connections
1010

1111
The `connection` property is a reference to environment configuration which specifies how the app should connect to Event Hubs. It may specify:
1212

13-
- The name of an application setting containing a [connection string](#connection-string)
14-
- The name of a shared prefix for multiple application settings, together defining an [identity-based connection](#identity-based-connections).
13+
- The name of an application setting containing a connection string.
14+
- The name of a shared prefix for multiple application settings, together defining a managed identity connection.
1515

1616
If the configured value is both an exact match for a single setting and a prefix match for other settings, the exact match is used.
1717

18-
### Connection string
18+
> [!TIP]
19+
> Managed identity connections are recommended over connection strings for improved security. Connection strings include credentials that could be exposed, while managed identities eliminate the need to manage secrets.
1920
20-
Obtain this connection string by clicking the **Connection Information** button for the [namespace](../articles/event-hubs/event-hubs-create.md#create-an-event-hubs-namespace), not the event hub itself. The connection string must be for an Event Hubs namespace, not the event hub itself.
21+
### [Managed identity](#tab/identity-based)
2122

22-
When used for triggers, the connection string must have at least "read" permissions to activate the function. When used for output bindings, the connection string must have "send" permissions to send messages to the event stream.
23+
If you are using [version 5.x or higher of the extension](../articles/azure-functions/functions-bindings-event-hubs.md?tabs=extensionv5), instead of using a connection string with a secret, you can have the app use a [Microsoft Entra identity](../articles/active-directory/fundamentals/active-directory-whatis.md). To do this, you would define settings under a common prefix which maps to the `connection` property in the trigger and binding configuration.
2324

24-
This connection string should be stored in an application setting with a name matching the value specified by the `connection` property of the binding configuration.
25+
In this mode, the extension requires the following application settings:
2526

26-
### Identity-based connections
27+
| Template-based setting | Description | Identity type |
28+
| --- | --- | --- |
29+
| `<CONNECTION_NAME_PREFIX>__fullyQualifiedNamespace` | The fully qualified Event Hubs namespace. | System-assigned or user-assigned |
30+
| `<CONNECTION_NAME_PREFIX>__credential` | Must be set to `managedidentity`. | User-assigned |
31+
| `<CONNECTION_NAME_PREFIX>__clientId` | The client ID of the user-assigned managed identity. | User-assigned |
2732

28-
If you are using [version 5.x or higher of the extension](../articles/azure-functions/functions-bindings-event-hubs.md?tabs=extensionv5), instead of using a connection string with a secret, you can have the app use a [Microsoft Entra identity](../articles/active-directory/fundamentals/active-directory-whatis.md). To do this, you would define settings under a common prefix which maps to the `connection` property in the trigger and binding configuration.
33+
The value that you replace `<CONNECTION_NAME_PREFIX>` with is treated by the binding extension as the name of the connection setting.
34+
35+
For example, if your binding configuration specifies `connection = "EventHubConnection"` with a user-assigned managed identity, you would configure the following application settings:
2936

30-
In this mode, the extension requires the following properties:
37+
```json
38+
{
39+
"EventHubConnection__fullyQualifiedNamespace": "myeventhubns.servicebus.windows.net",
40+
"EventHubConnection__credential": "managedidentity",
41+
"EventHubConnection__clientId": "00000000-0000-0000-0000-000000000000"
42+
}
43+
```
3144

32-
| Property | Environment variable template | Description | Example value |
33-
|--------------|----------|-----|----------|
34-
| Fully Qualified Namespace | `<CONNECTION_NAME_PREFIX>__fullyQualifiedNamespace` | The fully qualified Event Hubs namespace. | `myeventhubns.servicebus.windows.net`|
45+
> [!TIP]
46+
> Use user-assigned managed identities for production scenarios where you need fine-grained control over identity permissions across multiple resources.
3547
36-
Additional properties may be set to customize the connection. See [Common properties for identity-based connections](../articles/azure-functions/functions-reference.md#common-properties-for-identity-based-connections).
48+
You can use additional settings in the template to further customize the connection. See [Common properties for identity-based connections](../articles/azure-functions/functions-reference.md#common-properties-for-identity-based-connections).
3749

3850
> [!NOTE]
3951
> When using [Azure App Configuration](../articles/azure-app-configuration/quickstart-azure-functions-csharp.md) or [Key Vault](/azure/key-vault/general/overview) to provide settings for Managed Identity connections, setting names should use a valid key separator such as `:` or `/` in place of the `__` to ensure names are resolved correctly.
40-
>
41-
> For example, `<CONNECTION_NAME_PREFIX>:fullyQualifiedNamespace`.
52+
>
53+
> For example: `EventHubConnection:fullyQualifiedNamespace`
4254
4355
[!INCLUDE [functions-identity-based-connections-configuration](./functions-identity-based-connections-configuration.md)]
4456

4557
[!INCLUDE [functions-event-hubs-permissions](./functions-event-hubs-permissions.md)]
58+
59+
### [Connection string](#tab/connection-string)
60+
61+
Obtain this connection string by clicking the **Connection Information** button for the [namespace](../articles/event-hubs/event-hubs-create.md#create-an-event-hubs-namespace), not the event hub itself. The connection string must be for an Event Hubs namespace, not the event hub itself.
62+
63+
When used for triggers, the connection string must have at least "read" permissions to activate the function. When used for output bindings, the connection string must have "send" permissions to send messages to the event stream.
64+
65+
This connection string should be stored in an application setting with a name matching the value specified by the `connection` property of the binding configuration.
66+
67+
---

0 commit comments

Comments
 (0)