question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updating function app system key uses systemKey instead of systemKeys resulting in 404

See original GitHub issue

Describe the bug

Updating function systemKeys fails because cli expects systemKey but API expects systemKeys for api version 2022-03-01.

Using the Try it functionality for the API docs and passing systemKeys works as expected. https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/create-or-update-host-secret

Command Name az functionapp keys set

Errors:

Operation returned an invalid status 'Not Found'

cli.azure.cli.core.azclierror: az functionapp keys set: 'systemKeys' is not a valid value for '--key-type'. Allowed values: systemKey, functionKeys, masterKey.

To Reproduce:

  • az functionapp keys set -g {} -n {} --key-type systemKey --key-name {} --key-value {}

Expected Behavior

–key-type should accept systemKeys to match expected API format.

Environment Summary

Windows-10-10.0.19044-SP0
Python 3.10.5
Installer: MSI

azure-cli 2.41.0

Extensions:
azure-devops 0.18.0
dev-spaces 1.0.6

Dependencies:
msal 1.20.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Francisco-Gaminocommented, Nov 28, 2022

Adding @amamounelsayed and @kaibocai from the Functions team.

@amamounelsayed / @kaibocai – Could you please work with the Az CLI team to update the boot to include you both + the new PM owner and remove me and Stefanus? Thanks.

1reaction
RakeshMohanMSFTcommented, Nov 7, 2022

@scp-mb We see that the REST API seems to be accepting SystemKeys and not SystemKey. Let me discuss internally further and update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Function Host Keys missing - Microsoft Q&A
I am getting 404 if i try to re-register master key or add any key ... The other one is public and it...
Read more >
Missing systemkey · Issue #983 · Azure/Azure-Functions
When I try to retrieve the function apps system key with the url https://myFunc.ase.host.com/admin/host/systemkeys I get empty result after ...
Read more >
Change the Azure Functions system keys - Michael Collier
I was recently asked how to change Azure Functions' system keys, such as the ones automatically created by the Event Grid or Durable...
Read more >
New deployed azure function returns 404 Not Found error
I have fixed this by updating the value of the "FUNCTIONS_EXTENSION_VERSION" from 1 to 3. For some reason every time I deployed using...
Read more >
Azure Function keys - what are those and how to access them
Azure Function Keys are used for authorizing access to the functions. ... Function App in the portal, you can view the host and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found