I was able set up System assigned managed identity for function that listens service bus: I turned on System Assigned identity in my function, changed connection string to 'Endpoint=my_endpoint;Authentication=ManagedIdentity' and assigned a role for function to use service bus. My function code snippet is as follows:
[FunctionName("MyAwesomeFunction")]
public static async Task RunAsync([ServiceBusTrigger("myawesome-queue", Connection = "MyAwesomeConn")] string queueItem)
{
// func code
}
Now I'm trying to do the same but using User assigned identity: I created managed identity, added it to function and assigned a role for it in service bus. But looks like it doesn't work - messages don't get to my queue. Any advice? Thanks.
ManagedIdentity is not supported by service bus and Queue trigger. You have to use a complete connection string with a shared access signature.
As documented here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-service-bus#add-to-your-functions-app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With