I have written a azure pipeline named my-azure-pipelines.yml to download the artifacts published in a specific build.
I have used the following task in my pipeline to download the artifacts from a specific build.
- task: DownloadBuildArtifacts@0
displayName: 'Download Artifacts'
inputs:
buildType: 'specific'
project: 'YourProjectName' # Replace with your Azure DevOps project name
**definition: 'YourBuildPipelineName' # Replace with the name of your build pipeline**(error)
buildId: 'YourBuildId' # Specify the build ID you want to download artifacts from
downloadType: 'single'
artifactName: 'YourArtifactName' # Replace with the name of the published artifact
downloadPath: '$(System.DefaultWorkingDirectory)/DownloadedArtifacts'
I am getting error which says ##[error]Definition name xyz didn't correspond to a valid definition
I am not sure what a build definition is and how to find it. Appreciate if somebody explains
I was expecting that the artifacts would be downloaded but due to the error the artifact are not getting downloaded
Error:


There is no
definitionparameters for the task DownloadBuildArtifacts@0.To fix the error, you can
settings(grey) link to simply pick the value for the parameters on the right side.addbutton, it will automatically override with correct values.After fix, it should look like below:
In addition, if the artifact comes from
anotherproject, please go toProject settings-> Pipelines -> Settings -> Toggle off the optionLimit job authorization scope to current project for non-release pipelines.If the target build is in same project, the option above is not needed.