Azure Static Web Apps deployment fails with "Request is missing the pull request id" and Production remains Uploading

2026-08-20T16:25:02.85+00:00

I am unable to deploy a simple static website to Azure Static Web Apps using the Static Web Apps CLI.

Environment:

  • Windows 11
  • Azure Static Web Apps CLI: 2.0.10
  • Deployment method: direct deployment using a deployment token
  • Front-end consists of a simple index.html file
  • No GitHub repository or Pull Request is being used

Command used:

swa deploy . --env production --deployment-token $token

The deployment fails with:

Deployment failed with exit code 1

The deployment binary exited with code 1.

I then ran:

swa deploy . --env production --deployment-token $token --dry-run --verbose

The detailed error is:

The content server has rejected the request with: BadRequest

Reason: Request is missing the pull request id.

The deployment is explicitly targeting the production environment and is using a valid deployment token.

I reproduced the issue with TWO different Azure Static Web Apps resources:

  1. contsales-presenca-teams
  2. contsales-presenca-teams-v2

Both resources were created independently and used different deployment tokens.

For both resources, the Production environment becomes stuck with:

status: "Uploading"

This was confirmed directly through Azure CLI using:

az staticwebapp environment show --name <resource-name> --resource-group ContSales-Presenca-Teams --environment-name default --output jsonc

For the second resource, the environment currently reports:

buildId: "default"

name: "default"

sourceBranch: null

pullRequestTitle: null

status: "Uploading"

StaticSitesClient.exe was also tested directly and executes normally, so this does not appear to be a missing native dependency issue.

Deployment IDs captured during troubleshooting:

First resource:

8c4bebc8-643b-4266-b584-5d0cac73cf2a

Second resource:

385e251b-e630-4a11-a3cc-732e205cc7f1

Because the same failure occurs on two independently created Static Web Apps with separate deployment tokens, I suspect there may be an issue with the Azure Static Web Apps content/deployment backend rather than the application files or local environment.

Could someone from the Azure Static Web Apps team please verify these Deployment IDs and determine why a direct production deployment using a deployment token is being rejected for a missing Pull Request ID?

Thank you.

Azure Static Web Apps
Azure Static Web Apps

An Azure service that provides streamlined full-stack web app development.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Rukshan edirisinghe 0 Reputation points
    2026-08-20T18:56:17.8+00:00

    Hi@Reginaldo Sales | Contabilidade Contsales ,

    Good diagnosis on your end. This exact error ("Request is missing the pull request id" with Production stuck on "Uploading") is a known open issue with token-based swa deploytracked here since 2024:

    https://github.com/Azure/static-web-apps/issues/1435. It happens when the deployment doesn't get associated with the production environment on the backend, so the content server falls back to expecting a preview/PR deployment, which requires a pull request ID.

    Things to check, in order of likelihood:

    1. Confirm the token is actually being passed. On Windows, $token is PowerShell syntax and won't expand in cmd. If the token arrives empty or malformed, the backend can't resolve the environment and throws exactly this error, which would explain why it reproduces identically across both resources. Test by printing it, or set it explicitly:
    $env:SWA_CLI_DEPLOYMENT_TOKEN="<paste-token-directly>"
    swa deploy ./ --env production
    
    1. Reset the deployment token in the portal (SWA resource > Overview > Manage deployment token > Reset) and use the new one if the current token is stale or tied to a mismatched resource.
    2. Make sure you're on the latest CLI: npm install -g @azure/static-web-apps-cli@latestThen retry.
    3. Try deploying from inside the content folder without the flag, since swa deploy targets production by default:
    cd <folder-with-index.html>
    swa deploy
    

    If the token is confirmed valid and correctly passed and it still fails on two independent resources, then it's reasonable to treat it as a backend issue. Since you already have the Deployment IDs captured, raise it on the issue thread above or open an Azure support ticket with those IDs and resource names so the team can trace the rejected requests server-side.

    Reference: https://learn.microsoft.com/en-us/azure/static-web-apps/static-web-apps-cli-deploy

    Was this answer helpful?

    0 comments No comments

  2. TP 162.1K Reputation points Volunteer Moderator
    2026-08-20T17:59:37.8066667+00:00

    Hi,

    Please try deploying from a different directory than your files (your index.html) are in. For example, say your contsales-presenca-teams Static Web App site files are stored in C:\temp\mysite. Please open Command (cmd.exe) prompt and run commands similar to below:

    cd c:\temp
    swa deploy C:\temp\mysite\ --resource-group swa-resource_group --app-name contsales-presenca-teams --deployment-token <your token> --env Production --verbose
    

    NOTE: In above example, the current directory is C:\Temp when I ran swa, which is different than the directory where the site files are stored.

    When it finishes you should see message in green similar to:

    Project deployed to https://<your default SWA url>

    After a bit of a delay (refresh portal) Status should switch to Ready

    Please reply back with your results, whether positive or negative.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.