Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

`az functionapp keys set` throws 'Not Found'

Open kimjamia opened this issue 4 years ago • 4 comments

Describe the bug

Possibly related issue: Azure/Azure-Functions#2221

Command Name az functionapp keys set

Errors:

Operation returned an invalid status 'Not Found'

az functionapp show --name {} --resource-group {} with the same parameter values works as expected.

To Reproduce:

  • Linux Function App v4.
  • Configured to pull container image from Azure Container Registry using managed identity.
  • az functionapp keys set --key-type masterKey --name {} --resource-group {} --key-name "_master"

Expected Behavior

A key named _master with a generated value was created and assigned to the function app.

Environment Summary

Linux-4.4.0-19041-Microsoft-x86_64-with-debian-bullseye-sid, Ubuntu 20.04 LTS
Python 3.6.10
Installer: DEB

azure-cli 2.31.0

Extensions:
aks-preview 0.5.49

Additional Context

kimjamia avatar Jan 03 '22 11:01 kimjamia

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ahmedelnably, @fabiocav.

Issue Details

Describe the bug

Possibly related issue: Azure/Azure-Functions#2221

Command Name az functionapp keys set

Errors:

Operation returned an invalid status 'Not Found'

az functionapp show --name {} --resource-group {} with the same parameter values works as expected.

To Reproduce:

  • Linux Function App v4.
  • Configured to pull container image from Azure Container Registry using managed identity.
  • az functionapp keys set --key-type masterKey --name {} --resource-group {} --key-name "_master"

Expected Behavior

A key named _master with a generated value was created and assigned to the function app.

Environment Summary

Linux-4.4.0-19041-Microsoft-x86_64-with-debian-bullseye-sid, Ubuntu 20.04 LTS
Python 3.6.10
Installer: DEB

azure-cli 2.31.0

Extensions:
aks-preview 0.5.49

Additional Context

Author: kimjamia
Assignees: -
Labels:

Service Attention, Functions, customer-reported

Milestone: -

msftbot[bot] avatar Jan 04 '22 02:01 msftbot[bot]

route to service team

yonzhan avatar Jan 04 '22 02:01 yonzhan

It may be the storage endpoint suffix you're using in the initial deployment of the function app, if youre function app has its own storage account. In a test environment, we had core.windows.net hardcoded but then had an issue going to another environment, and the "404" for a function key update was referring to an internal error finding the container azure-webjobs-secrets.

cutecycle avatar Feb 09 '22 23:02 cutecycle

We get the same error 'Not Found' when we try to set the masterKey via azure cli.

This does not work and returns Operation returned an invalid status 'Not Found'

az functionapp keys set -g 'RG' -n 'FNAPP' --key-type masterKey --key-name '_master' --key-value 'MYKEY'

Turns out, to set the masterKey you have to set it with the type functionKeys. So this does work:

az functionapp keys set -g 'RG' -n 'FNAPP' --key-type functionKeys --key-name '_master' --key-value 'MYKEY'

Seems wrong to me...

BorisWilhelms avatar Jul 08 '22 12:07 BorisWilhelms