Azure Pipelines Typed Parameter Validation Failed
A template parameter declares a type (and optionally an allowed values: list). Passing a value of the wrong type, or one not in the allowed list, fails compile-time validation before the template expands.
What this error means
The pipeline fails to compile with <value> is not a valid value for <param> or a type error, pointing at the parameters: you passed. Distinct from an unknown-parameter error - the name is right but the value is rejected.
/azure-pipelines.yml: 'release' is not a valid value for 'buildConfiguration'.
Valid values are: Debug, ReleaseCommon causes
Value outside the allowed values list
A parameter declared with values: accepts only those exact strings (case-sensitive). release fails when the list is Debug, Release.
Wrong type for the declared parameter
Passing a string to a boolean/number, or a flat list to an object/stepList, fails type validation. Typed parameters enforce shape, not just presence.
How to fix it
Pass a value matching the declared type and list
Match casing and type exactly against the template’s declaration.
# template: parameters: [ {name: buildConfiguration, type: string, values: [Debug, Release]} ]
steps:
- template: templates/build.yml
parameters:
buildConfiguration: Release # exact, case-sensitiveDeclare precise types in the template
- Use
type: boolean/number/object/stepListto enforce the right shape. - Add a
values:list to constrain string parameters to a known set. - Validate callers after tightening a parameter’s type or values.
How to prevent it
- Constrain string parameters with an explicit
values:list. - Use typed parameters (
boolean,object,stepList) instead of raw strings. - Keep allowed-value casing consistent and documented.