Azure Static Web Apps deployment fails with invalid API key despite token rotation

Đang mở
#1,825 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
azure, github-actions
Lĩnh vực
ci-cd, cloud

Hướng nghiên cứu

Start with the repository’s GitHub Actions deployment workflow and the Azure/static-web-apps-deploy@v1 action inputs, then correlate the failed authentication step with the Static Web App resource configuration. Inspect whether deploymentAuthPolicy: GitHub permits the azure_static_web_apps_api_token flow and whether Azure documents a repository-token update path. Done would mean identifying the supported policy/token configuration and demonstrating a successful deployment without recreating the resource or losing its custom domain.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

:::writing{variant="standard" id="58321"}

Problem

My Azure Static Web App was deploying successfully through GitHub Actions until November 22, 2026. Subsequent deployments fail with:

The content server has rejected the request with: BadRequest
Reason: No matching Static Web App was found or the api key was invalid.

Environment

  • Azure Static Web Apps Free plan
  • Resource: azure-resume
  • Resource group: azure-resume-rg
  • GitHub repository: swiswach/azure-resume
  • Branch: main
  • Deployment action: Azure/static-web-apps-deploy@v1
  • Application directory: site
  • Deployment authorization policy: GitHub

Troubleshooting performed

  1. Confirmed the last successful deployment on November 22, 2026.
  2. Confirmed the application directory exists and the build completes.
  3. Verified the GitHub Actions secret name matches the workflow.
  4. Reset the Azure deployment token and updated the GitHub repository secret.
  5. Reran the deployment; the same authentication error occurred.
  6. Removed unused OIDC steps and the unsupported github_id_token input from the workflow.
  7. Inspected the Azure resource using Resource Explorer and Azure CLI.

The resource configuration contains:

"deploymentAuthPolicy": "GitHub"

Attempts to change this to DeploymentToken using Azure CLI and the Azure management API fail with:

DeploymentAuthPolicy is invalid.
Cannot update policy without providing repository token.

The deployment authorization controls in Azure Portal are grayed out.

Expected behavior

GitHub Actions should successfully deploy the website using the current Azure Static Web Apps deployment token, or Microsoft should provide a supported method for configuring the appropriate deployment authorization policy.

Questions

  1. Why is the deployment token rejected even after rotation?
  2. Is deploymentAuthPolicy: GitHub compatible with Azure/static-web-apps-deploy@v1 when using azure_static_web_apps_api_token?
  3. What is the supported method for changing the deployment authorization policy without recreating the Static Web App?

I would like to preserve the existing Free-tier resource and custom domain.

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
347
Fork
68
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/static-web-apps

Tất cả issue của Azure/static-web-apps

Issue tương tự

Thêm issue về DevOps

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.