You are configuring an Azure Function App (V4) to retrieve messages from an Azure Service Bus queue using an identity-based connection. The Function App is configured with a user-assigned managed identity that has been granted the Azure Service Bus Data Receiver role on the Service Bus namespace. The trigger connection in the function code is named ServiceBusConnection. To ensure the Function App can successfully authenticate and connect using the user-assigned managed identity, which group of application settings must you configure?
- ServiceBusConnection__fullyQualifiedNamespace set to the namespace URL, ServiceBusConnection__credential set to managedidentity, and ServiceBusConnection__clientId set to the client ID of the user-assigned managed identity.Cevap
- BServiceBusConnection set to the namespace URL, and ServiceBusConnection__managedIdentity set to the resource ID of the user-assigned managed identity.
- CServiceBusConnection set to reference the Service Bus connection string using the Key Vault reference syntax @Microsoft.KeyVault(SecretUri=...).
- DServiceBusConnection__serviceUri set to the namespace URL, and ServiceBusConnection__authentication set to SystemAssigned in the host.json file.
Cevap
Configure ServiceBusConnection__fullyQualifiedNamespace with the namespace URL, ServiceBusConnection__credential with managedidentity, and ServiceBusConnection__clientId with the client ID of the user-assigned managed identity.
The correct answer specifies ServiceBusConnection__fullyQualifiedNamespace, ServiceBusConnection__credential set to managedidentity, and ServiceBusConnection__clientId set to the client ID of the user-assigned managed identity. This aligns with the Azure Functions programming model for configuring user-assigned managed identities for external service triggers.
Adım Adım Çözüm
Anahtar Kavram
Azure Functions identity-based connections allow secure resource access without secrets by configuring FQDN and managed identity properties in the application settings.