Skip to content
Latchkey

Azure Pipelines "Resource not authorized" (pipeline resource)

A resources: block (a pipelines: resource for cross-pipeline artifacts, or a repositories: resource) references something the pipeline is not authorized to consume. The declaration is valid but access has not been granted.

What this error means

The run fails noting the declared resource is not authorized for use, naming the pipeline or repository resource. It is an authorization gate, not a YAML error.

azure-pipelines
##[error]The pipeline resource 'upstream' is not authorized for use
in this pipeline.

Common causes

Cross-pipeline/repository resource not authorized

Consuming another pipeline's artifacts or checking out another repo requires authorization for that source. A first reference is blocked until granted.

Resource name or project mismatch

The resource source:/name: must point at a real pipeline/repo the consumer can access. A wrong project or renamed source leaves it unauthorized.

How to fix it

Declare and authorize the resource

Declare the resource and authorize the pipeline to consume it.

azure-pipelines.yml
resources:
  pipelines:
    - pipeline: upstream
      source: build-pipeline
      project: Platform
  repositories:
    - repository: shared
      type: git
      name: Platform/shared-lib

Grant access on first use

  1. Use the run's authorization prompt to permit the named resource.
  2. Confirm the source/name and project point at an accessible source.
  3. Re-run after the one-time authorization is granted.

How to prevent it

  • Authorize cross-pipeline and cross-repo resources when first declared.
  • Keep resource source/name/project accurate after renames.
  • Reference only resources the consuming pipeline can access.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →