Question

Difficulty: HardCreate and Configure Azure Functions

You are developing an Azure Function App (V4 runtime) that contains a Service Bus triggered function. The function is configured with a connection property named `TelemetryServiceBus`.

Your company's security policy prohibits the use of secrets or connection strings in application settings. You must configure the Function App to connect to the Azure Service Bus namespace using a user-assigned managed identity that has the client ID `11111111-2222-3333-4444-555555555555`.

Which three application settings must you add to the Function App's configuration to establish this identity-based connection?

  1. TelemetryServiceBus__fullyQualifiedNamespaceAnswer
  2. TelemetryServiceBus__credentialAnswer
  3. TelemetryServiceBus__clientIdAnswer
  4. D
    TelemetryServiceBus__identityId
  5. E
    TelemetryServiceBus__authentication
  6. F
    TelemetryServiceBus__connectionString

Answer

TelemetryServiceBus__fullyQualifiedNamespace, TelemetryServiceBus__credential, and TelemetryServiceBus__clientId
To configure a Service Bus trigger with an identity-based connection using a user-assigned managed identity, the Azure Functions runtime requires the setting prefix 'TelemetryServiceBus' followed by double underscores and specific suffixes. The 'fullyQualifiedNamespace' suffix defines the target Service Bus resource. The 'credential' suffix set to 'managedidentity' along with 'clientId' containing the GUID of the user-assigned managed identity are required for the host to successfully authenticate using that specific identity.

Step-by-Step Solution

1
Identify the prefix for the identity-based connection settings.
The prefix must match the connection property name specified in the function binding, which is 'TelemetryServiceBus'.
Azure Functions V4 uses the connection property name as the prefix followed by double underscores to bind identity-based configuration properties.
2
Configure the namespace property for the connection.
Create the application setting 'TelemetryServiceBus__fullyQualifiedNamespace' pointing to the Service Bus fully qualified domain name.
The namespace location is required so the runtime knows where to locate the Service Bus namespace.
3
Configure the credential type and user-assigned managed identity client ID.
Create 'TelemetryServiceBus__credential' with the value 'managedidentity' and 'TelemetryServiceBus__clientId' with the client ID of the user-assigned identity.
By default, the host assumes a system-assigned managed identity. To use a user-assigned managed identity, 'credential' must be explicitly set to 'managedidentity' and 'clientId' must specify the target identity's client ID.

Key Concept

Azure Functions Identity-Based Connections
Rate this question