在本地运行timerTrigger函数返回"错误调用函数host:Unauthorized"

时间:2017-04-28 17:36:59

标签: azure azure-functions

我有一个在Azure中运行良好的timerTrigger函数,但在本地运行它时会返回"错误调用函数host:Unauthorized"。 怎么了 ?如何在本地运行时间触发器?

function.json

{
  "bindings": [
    {
      "name": "myTimer",
      "type": "timerTrigger",
      "direction": "in",
      "schedule": "0 30 8 * * 1"
    }
  ],
  "disabled": false
}

在Visual Studio代码(或命令行)中执行

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\Projects\reporting-function> func run .\MyFunction\
Error calling the functions host: Unauthorized
PS C:\Projects\reporting-function>

1 个答案:

答案 0 :(得分:6)

我们调查过,这是函数CLI中的一个错误。这个问题已被理解,并且有一个pull request

修复将在下一个版本中。