ARM template Key Vault - Invalid value for “access

2019-08-23 04:49发布

问题:

I need to configure key vault permissions for a FunctionApp. I am getting the error "An invalid value was provided for 'accessPolicies'.

Here is my variable declartion,

  "variables": {
    "identityResourceId": "[concat(resourceId('Microsoft.Web/sites/',variables('functionAppName')),'/providers/Microsoft.ManagedIdentity/Identities/default')]"

  }

Here is my "output" section,

  "outputs": {
    "AppObjectId": {
      "type": "string",
      "value": "[reference(variables('identityResourceId'), '2015-08-31-PREVIEW').principalId]"
    }
  }

I am not receiving the correct "ObjectID" value into the output variable "AppObjectId". Any help will be appreciated.