Skip to content

webapp webjob triggered list drops actionable 409 response body #33824

Description

@btardif

Describe the bug

az webapp webjob triggered list drops the actionable response body returned by Kudu for a 409 Conflict. The CLI reports only a generic status name, hiding the exact configuration prerequisite that failed.

Related command

Preconditions:

  • Linux App Service app.
  • properties.webJobsEnabled=false on the Microsoft.Web/sites/config resource.
  • A valid triggered WebJob deployed under App_Data/jobs/triggered/AppendLine.
az webapp webjob triggered list `
  --name <linux-app-name> `
  --resource-group <resource-group>

Errors

Azure CLI output:

Operation returned an invalid status 'Conflict'

Exit code: 1.

The authenticated Kudu endpoint returns an actionable body for the same operation:

GET https://<app-name>.scm.azurewebsites.net/api/triggeredwebjobs
HTTP/1.1 409 Conflict
{
  "error": "The web app is not configured to run the web job. Please enable running web jobs before calling the API."
}

Issue script & Debug output

The package was deployed successfully, and Kudu VFS confirmed these files existed:

site/wwwroot/App_Data/jobs/triggered/AppendLine/message.txt
site/wwwroot/App_Data/jobs/triggered/AppendLine/run.sh
site/wwwroot/App_Data/jobs/triggered/AppendLine/settings.job
site/wwwroot/App_Data/jobs/triggered/AppendLine/WebjobTest.AppendLine.dll
site/wwwroot/App_Data/jobs/triggered/AppendLine/WebjobTest.AppendLine.runtimeconfig.json

After setting properties.webJobsEnabled=true, the unchanged CLI command succeeded and returned the AppendLine job. This isolates the conflict to the disabled WebJobs runtime and confirms the service response body contained the required remediation.

Expected behavior

Azure CLI should include the service response body in its error output, for example:

The web app is not configured to run WebJobs. Enable webJobsEnabled and retry.

At minimum, the original JSON error body should be preserved instead of being reduced to Conflict.

Environment Summary

azure-cli                         2.88.0
core                              2.88.0
telemetry                          1.1.0

Extensions:
azure-devops                       1.0.6
kusto                              0.5.0
resource-graph                     2.1.1

Dependencies:
msal                              1.36.0
azure-mgmt-resource               24.0.0

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Python (Windows) 3.14.5 [MSC v.1944 64 bit (AMD64)]
PowerShell 7.6.4
Windows 10.0.26200

Additional context

The generic CLI output led to unnecessary investigation of deployment layout even though the files were present. Direct Kudu inspection immediately identified the missing site-level runtime switch.

No existing Azure/azure-cli issue containing the exact Kudu error text was found.

Suggested assignee: Jordan Selig (@seligj95)

Activity

  1. added
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Jul 31, 2026
  2. yonzhan commented on Jul 31, 2026

    @yonzhan
    Collaborator

    Thank you for opening this issue, we will look into it.

  3. x-engineering-agent commented on Jul 31, 2026

    @x-engineering-agent
    Contributor

    Bug Analysis

    az webapp webjob triggered list (appservice module) surfaces only a generic
    Operation returned an invalid status 'Conflict' message for a Kudu 409
    response, discarding the actionable JSON error body (e.g. "The web app is not
    configured to run the web job. Please enable running web jobs before calling
    the API.").

    Root cause: the Kudu client call for triggered webjobs list does not
    capture/surface the response body when raising on non-2xx status codes,
    falling back to the generic HTTP status reason phrase instead of the JSON
    error message from the response.

    Suggested fix: when the Kudu request for triggered webjob list (and
    ideally other Kudu-backed webjob operations) returns a non-2xx status, parse
    the JSON body's error/Message field and include it in the raised
    CLIError, instead of only reporting the generic status text. This should be
    handled similarly to how other Kudu-backed commands in this module report
    errors, so the CLI reproduces the actionable Kudu error text
    (e.g. "The web app is not configured to run WebJobs. Enable webJobsEnabled and
    retry.") instead of just "Conflict".

    Add/adjust a scenario or unit test asserting the response body is echoed in
    the raised error for a 409 from this endpoint.

    Use this EXACT PR title: [AppService] Fix #33824: az webapp webjob triggered list: Preserve Kudu error response body on 409 Conflict

    PR title & description format (required)

    This repo enforces a PR format (guide). Please author the PR exactly as follows or CI's Check the Format of Pull Request Title and Content will fail.

    Use this EXACT PR title (copy verbatim, do not reword):

    [AppService] Fix #33824: `az webapp webjob triggered list`: Preserve Kudu error response body on 409 Conflict
    

    Keep the backticks around the command and the Fix #33824: prefix. You may only adjust the wording after the command (the final summary) if the fix changes; the [AppService] prefix, issue link, and backticked command must stay.

    Description — follow the PR template and fill in:

    • Link the issue — start the Description with a closing keyword so the PR auto-links and closes it: Fixes #33824.
    • Related command — the az ... command this affects.
    • Description (mandatory) — why the bug happens, what you changed, and the resulting behavior.
    • Testing Guide — example command(s) showing the fix works.
    • History Notes — leave the title to drive the history note, or add extra lines in the same format (component in brackets + the command in backticks), e.g. [AppService] `az <command>`: <note>.
    • Keep the template checklist and tick the items you've satisfied.

    Posted by agent-assist (autonomous bug-fix pipeline).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Auto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.Web Appsaz webappact-observability-squadapp-service-generalbugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions