An Azure service that provides an event-driven serverless compute platform.
Using User Managed Identity in Azure function Service Bus triggers not working
I have a function that uses Service bus trigger and wanted to use "User Managed Identity". I couldn't get this working even after following all the config settings.
Below is the config I am using :
The Function trigger looks like:
public static async Task Run([ServiceBusTrigger("myqueue", Connection = "ServiceBusUsrIdty")] ServiceBusReceivedMessage[] servBusRcvMsg, ILogger log)
In the App settings:
ServiceBusUsrIdty<doubleunderscore>fullyQualifiedNamespace = <service bus namespace>.servicebus.windows.net
ServiceBusUsrIdty<doubleunderscore>clientId = <client id of the user managed identity>
ServiceBusUsrIdty<doubleunderscore>credential = "managedidentity"
With the above setting, I couldn't get it working and I then added the below as well but no luck
AzureWebJobsServiceBusUsrIdty = "Endpoint=sb://<service bus namespace>.servicebus.windows.net/;Authentication=ManagedIdentity"
I am using the package : Azure.Messaging.ServiceBus v7.5.1
The User managed identity is added in the Function App settings and it was granted "Contributor" access in the service bus
What else am I missing to get this working ? The documentation from Microsoft doesn't sufficient details though.
Azure Functions
Microsoft Security | Microsoft Entra | Microsoft Entra ID
A cloud-based identity and access management service for securing user authentication and resource access