| title | BCP071 |
|---|---|
| description | Expected <argument-count>, but got <argument-count>. |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
This diagnostic occurs when a function is given an incorrect number of arguments. For a list of system defined functions, see Bicep functions. To define you own functions, see User-defined functions.
Expected <argument-count>, but got <argument-count>.
Error
Provide the correct number of arguments.
The following example raises the diagnostic because split() expects two arguments, but three arguments were provided:
var tooManyArgs = split('a,b', ',', '?')You can fix the diagnostic by removing the extra argument:
var tooManyArgs = split('a,b', ',', '?')For more information about Bicep diagnostics, see Bicep core diagnostics.