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

Luca Berton
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

  1. Mismatch Between Template and Parameter File: The ARM template (CreateVMTemplate.json) does not have the location parameter defined, yet the pipeline is passing it.
  2. Incorrect Parameter Configuration: The parameter file (CreateVMTemplate.parameters.json) or the pipeline is passing parameters that are not…

--

--

Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday