为什么我无法从 kudu 控制台触发 AzureRM 功能

why I can not trigger AzureRM functions from the kudu console

这是我的尝试。我无法从这里执行此操作。

我应该在哪里做这个? Azure CLI ?

您可以尝试使用服务主体以非交互方式登录到 Azure。以下命令对我有用,请参考。

$tenantId = "xxxxxxxxxx";
$appId = "xxxxxxxxxx";
$azurePassword = ConvertTo-SecureString "xxxxxx" -AsPlainText -Force
$psCred = New-Object System.Management.Automation.PSCredential($appId , $azurePassword)
Add-AzureRmAccount -Credential $psCred -TenantId $tenantId  -ServicePrincipal

详细信息请查看this article: "Log in to Azure Resource Manager (ARM) through Kudu to use ARM PowerShell"