Describe the bug
When trying to rotate the api key of azure static webapp the command throws the error.
Operation returned an invalid status 'Bad Request'
Related command
az staticwebapp secrets reset-api-key --name ${STATIC_WEB_APP_NAME}
Errors
Operation returned an invalid status 'Bad Request'
Issue script & Debug output
Confidential values
Expected behavior
The staticwebapp secret should rotate successfully
Environment Summary
azure-cli 2.87.0
core 2.87.0
telemetry 1.1.0
Extensions:
bastion 1.4.2
ssh 2.0.6
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Python location 'C:\Users\Downloads\azure-cli-2.87.0-x64\python.exe'
Config directory 'C:\Users.azure
Extensions directory 'C:\Users.azure\cliextensions
Python (Windows) 3.13.13 (tags/v3.13.13:01104ce, Apr 7 2026, 19:25:48) [MSC v.1944 64 bit (AMD64)]
Legal docs and information:aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response
Describe the bug
When trying to rotate the api key of azure static webapp the command throws the error.
Operation returned an invalid status 'Bad Request'
Related command
az staticwebapp secrets reset-api-key --name ${STATIC_WEB_APP_NAME}
Errors
Operation returned an invalid status 'Bad Request'
Issue script & Debug output
Confidential values
Expected behavior
The staticwebapp secret should rotate successfully
Environment Summary
azure-cli 2.87.0
core 2.87.0
telemetry 1.1.0
Extensions:
bastion 1.4.2
ssh 2.0.6
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Python location 'C:\Users\Downloads\azure-cli-2.87.0-x64\python.exe'
Config directory 'C:\Users.azure
Extensions directory 'C:\Users.azure\cliextensions
Python (Windows) 3.13.13 (tags/v3.13.13:01104ce, Apr 7 2026, 19:25:48) [MSC v.1944 64 bit (AMD64)]
Legal docs and information:aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response