Skip to content
Latchkey

Azure Pipelines "Job depends on unknown job"

A job-level dependsOn references a job identifier the compiler cannot resolve within the stage. The id is misspelled, points at a displayName instead of the job: id, or names a job in a different stage.

What this error means

The pipeline fails to compile with Job <name> depends on unknown job <name>. The job dependency graph cannot be built, so the stage does not run.

azure-pipelines
/azure-pipelines.yml: Job 'deploy' depends on unknown job 'biuld'.

Common causes

Misspelled or display-name reference

Job dependsOn must use the job: identifier, not the human displayName. A typo or a label reference fails to resolve.

Cross-stage dependency expressed as job dependsOn

Job dependsOn only references jobs in the same stage. A dependency on a job in another stage needs stage-level dependsOn plus stageDependencies, not a bare job reference.

How to fix it

Reference the exact job id in the same stage

Use the job: identifier with matching case.

azure-pipelines.yml
jobs:
  - job: build
    steps: [ { script: echo build } ]
  - job: deploy
    dependsOn: build   # the job id, not the displayName
    steps: [ { script: echo deploy } ]

Use stage dependencies for cross-stage order

  1. Keep job dependsOn to jobs within the same stage.
  2. For cross-stage order, set stage-level dependsOn and read stageDependencies outputs.
  3. Validate the pipeline so dependency typos surface before a run.

How to prevent it

  • Give jobs short, unambiguous ids and reference those.
  • Keep job dependencies within the stage; use stages for cross-stage order.
  • Validate the pipeline after editing dependsOn.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →