Microsoft

Azure Pipeline: Error: Cannot read properties of undefined (reading 'templatePath').

Feb 24, 2023Chandra Sekhar Viswanadha
Azure Pipeline: Error: Cannot read properties of undefined (reading 'templatePath').
SummaryAI, from the source post

This post addresses a specific error ('Error: Cannot read properties of undefined (reading 'templatePath')') encountered when editing Azure DevOps YAML pipelines connected to external repositories (e.g., Bitbucket) where the associated service connection has been deleted. It provides two workarounds: 1. Using Azure DevOps REST APIs to retrieve the pipeline's JSON body, update the `connectedServiceId` with a valid service connection's resource ID, and then update the pipeline. 2. Editing a working YAML pipeline, accessing its classic editor via the 'Triggers' option, and then modifying the service connection for the non-working pipeline using the URL structure.

More from the Azure Pipelines Repository Access Control trail