Skip to content
Latchkey

Azure Pipelines "##[error]Input required: <name>"

A task validated its inputs and found a required one missing. Either the input key is absent or misspelled in YAML, or an expression that should supply it resolved to an empty string.

What this error means

A task step fails immediately with ##[error]Input required: <inputName>, naming the input the task could not find.

Azure DevOps
##[error]Input required: pathToPublish
##[error]Unhandled: Input required: pathToPublish

Common causes

The required input is missing or misspelled

The inputs: map omits the key, or it is spelled or cased differently than the task expects, so the task sees no value.

An expression supplying the value is empty

A variable or parameter feeding the input resolved to an empty string, which the task treats as not provided.

How to fix it

Provide the input with the exact key

Add the required input under inputs: using the precise name and casing from the task reference.

azure-pipelines.yml
- task: PublishBuildArtifacts@1
  inputs:
    pathToPublish: '$(Build.ArtifactStagingDirectory)'
    artifactName: 'drop'

Confirm any expression resolves to a value

  1. Echo the variable feeding the input to confirm it is not empty.
  2. Ensure the variable is defined before the task that consumes it.
  3. Quote the value so an empty result is visible rather than silently dropped.

How to prevent it

  • Copy required input names from the task reference, including casing.
  • Validate that variables feeding inputs are set before the task.
  • Use the YAML editor task assistant to insert required inputs.

Frequently asked questions

What causes ""Input required""?
The inputs: map omits the key, or it is spelled or cased differently than the task expects, so the task sees no value.
How do I fix "Input required"?
Add the required input under inputs: using the precise name and casing from the task reference.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card