How to Resolve the “InvalidTemplate: The following parameters were supplied, but do not correspond to any parameters defined in the template” Error in ARM Template Deployment
6 min readOct 5, 2024
When deploying an Azure Resource Manager (ARM) template through an Azure DevOps pipeline, you might encounter the following error:
##[error]Deployment template validation failed: 'The following parameters were supplied, but do not correspond to any parameters defined in the template: 'location'. The parameters defined in the template are: 'newVMName, labName, size, userName, password, Configure_WinRM_hostName'. Please see https://aka.ms/arm-pass-parameter-values for usage details.'.
This error occurs when the parameters passed to the ARM template during deployment do not match the parameters defined in the template. In this specific case, the parameter location
is being supplied, but it is not defined in the ARM template file.
Common Causes
- Mismatch Between Template and Parameter File: The ARM template (
CreateVMTemplate.json
) does not have thelocation
parameter defined, yet the pipeline is passing it. - Incorrect Parameter Configuration: The parameter file (
CreateVMTemplate.parameters.json
) or the pipeline is passing parameters that are not…