简体   繁体   English

使用 azure function 的用户分配的托管标识 - 这可能吗?

[英]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.

相关问题 使用用户分配的托管标识连接到 Azure Databricks - Connecting to Azure Databricks with user assigned managed identity "如何使用用户分配的托管标识访问 Azure 中 Function App Config 的 Key Vault" - How to use user-assigned managed identity to access Key Vault for Function App Config in Azure 具有用户分配的托管标识的 Azure 应用服务使应用程序崩溃 - Azure App Service with User-Assigned Managed Identity crashes application 用户在 azure 函数中分配的托管标识抛出值不能为空 - User assigned managed identity in azure functions throwing value cannot be null 如何将用户分配的托管身份添加到Azure Lab VM? - How to add user assigned managed identity to Azure Lab VM? Azure SQL 具有用户分配的托管标识的数据库连接池 - Azure SQL Database Connection Pooling with User Assigned Managed Identity 如何使用系统分配的托管标识保护 Azure 功能 - How to protect an Azure Function with System assigned Managed Identity 部署使用系统分配的托管标识的 azure 函数应用 - deploying azure function app that uses a system assigned managed identity Azure Function w/ User-Assigned Managed Identity 从 Key Vault 检索机密在本地工作,但在 Azure 门户中失败 - Azure Function w/ User-Assigned Managed Identity retrieves secrets from Key Vault works locally but fails in Azure Portal Is it possible to enable Managed Identity between Azure function and Azure Web API? - Is it possible to enable Managed Identity between Azure function and Azure Web API?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM