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://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-service-bus#add-to-your-functions-app
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.