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__fullyQualifiedNamespace = <service bus namespace>.servicebus.windows.net
ServiceBusUsrIdty__clientId = <client id of the user managed identity>
ServiceBusUsrIdty__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://.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.