Azure / Azure/azure-cli

Az CLI 2.87 az static webapp secrets command giving "Bad Request" error

Open
#33,659 3 comments 0 reactions 4 assignees Claimed by @mkarmark View on GitHub
act-observability-squad Auto-Assign bug customer-reported Service Attention staticwebapp
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.