[英]User assigned managed identity with azure function - is it possible?
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. 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:我的 function 代码片段如下:
[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.现在我正在尝试做同样的事情,但使用用户分配的身份:我创建了托管身份,将其添加到 function 并在服务总线中为其分配了一个角色。 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.服务总线和队列触发器不支持ManagedIdentity
。 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如此处所述: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-service-bus#add-to-your-functions-app
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.