Lesstep
Azure Pipelines · YAML · Checked November 9, 2026

Azure Pipelines: "The step name version appears more than once. Step names must be unique within a job"

Azure Pipelines first puts every template into the pipeline and only then checks it. When two steps in one job end up with the same name:, the run does not start. Most often it is one steps template called twice in the same job.

What it looks like

Encountered error(s) while parsing pipeline YAML:
Job Build: The step name version appears more than once. Step names must be unique within a job.

The line repeats for each extra copy. A typical case:

# azure-pipelines.yml
jobs:
- job: Build
  steps:
  - template: templates/fetch-tag.yml
    parameters:
      repo: api
  - template: templates/fetch-tag.yml
    parameters:
      repo: front

# templates/fetch-tag.yml
parameters:
- name: repo
  type: string
steps:
- pwsh: Write-Host "##vso[task.setvariable variable=TAG;isOutput=true]1.0.0"
  name: version

The question on Stack Overflow has been opened about 33,000 times.

When the pipeline is a pull request's build validation, the pull request waits on it: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, lists the pull request's branch policies with their state in IntelliJ IDEA, Rider or PyCharm, and with Pro runs a failed build policy again once the YAML is fixed. Its Pipelines tab (version 1.0.86 and later) lists the runs of the repositories you have open and opens a failed task's log in the editor, free to read.

Why

Build the name from a parameter

# templates/fetch-tag.yml
parameters:
- name: repo
  type: string
steps:
- pwsh: Write-Host "##vso[task.setvariable variable=TAG;isOutput=true]1.0.0"
  name: version_${{ parameters.repo }}

Drop name: when nothing reads it

If no later step uses $(version.SOMETHING), remove name: from the template and keep a displayName for the log. The template can then be called as often as you like in one job.

The same with jobs

One level up, jobs are referred to by their job: ID, in dependsOn and in dependencies, so a jobs template used twice in a stage needs its ID from a parameter too. Microsoft's reference for a job allows only letters, digits and _ in it, not starting with a digit: job: build_${{ parameters.repo }} is not a valid ID for a repository called my-api, so pass a separate parameter for it.

Azure DevOps pull requests in IntelliJ IDEA, Rider and PyCharm

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It shows the branch policies of a pull request with their state, so a required build that has not passed is next to its pull request, and with Pro you run a failed or expired build policy again from there. The review inbox is free; voting, commenting, completing and creating are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Azure DevOps and Azure Pipelines are trademarks of Microsoft Corporation; IntelliJ IDEA, Rider and PyCharm are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.

More: ##_vso[ in the log · An output variable is empty in the next job or stage · Unexpected symbol or Unrecognized value within expression · The 'name' parameter value '$(VAR)' is not a valid Boolean · A template expression is not allowed in this context · Unexpected value 'variables', 'stages' or 'steps' · 日本語