You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用AAD身份的Queue Trigger Azure Function启动报错:AzureWebJobsStorage不存在

Azure Function队列触发器切换AAD身份后启动异常问题

我们有一个配置了Queue Trigger的Azure Function,此前运行正常。数周前运维团队将其切换为AAD身份认证后,函数启动时持续抛出以下异常:

Error indexing method 'MyFunctionName' Storage account connection string 'AzureWebJobsStorage' does not exist. Make sure that it is a defined App Setting.

按照官方教程要求,我们已将应用设置AzureWebJobsStorage修改为AzureWebJobsStorage__accountName,操作确认无误。但修改后仍出现上述异常,仅当重新添加旧设置AzureWebJobsStorage时,函数才能恢复运行(此为临时解决方法)。

我们尝试了多种排查方案,包括:

  • 在[QueueTrigger]属性中指定自定义连接名
  • 在local.settings.json和appsettings.json中添加对应连接名配置
  • 添加AzureWebJobsStorageAccount__credential(值设为managedidentity)和AzureWebJobsStorageAccount__queueServiceUri等相关设置
    但所有尝试均未解决问题。

按教程逻辑,只需为托管标识授予存储账户访问权限,并修改对应应用设置名称及值,无需修改代码即可正常运行。请问我们遗漏了哪些关键步骤?

补充:当前本地开发环境的local.settings.json内容如下:

{
    "IsEncrypted": false,
    "Values": {
        "AzureWebJobsStorage": "UseDevelopmentStorage=true",
        "FUNCTIONS_WORKER_RUNTIME": "dotnet"
    }
}

内容的提问来源于stack exchange,提问作者Davide De Santis

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.12 10:53:02