Skip to content
Latchkey

Azure Pipelines "Pool not found" / Pool Not Authorized

The pool: name does not resolve to a pool available to this pipeline. The name is wrong, the pool was never added to the project, or the pipeline is not authorized to use it as a protected resource.

What this error means

The run fails before queueing with The pool <name> does not exist or has not been authorized for use. No agent is selected because the pool reference itself is invalid.

Azure DevOps
##[error]The pool 'Linux-Build' does not exist or has not been authorized
for use with this pipeline.

Diagnose it: variables, expressions, or the agent?

Azure Pipelines resolves compile-time expressions (${{ }}) before the run and runtime expressions ($[ ]) during it. Using the wrong one is the most common source of a value that is empty when you read it.

azure-pipelines.yml
# print what the job actually resolved
- script: |
    echo "reason: $(Build.Reason)"
    echo "branch: $(Build.SourceBranch)"
    env | sort | head -40
  displayName: Dump context

# enable full diagnostics on a run: set system.debug = true as a variable

Common causes

Pool name wrong or not in this project

Agent pools are added to projects from the org. A typo, or a pool that was never granted to the project, makes pool: { name: ... } unresolvable.

Pool not authorized for the pipeline

Agent pools are protected resources. A new pipeline referencing a pool may need explicit authorization before it can use it.

How to fix it

Reference the exact authorized pool name

Use the pool name as shown in Project Settings → Agent pools.

azure-pipelines.yml
pool:
  name: Default        # exact pool name available to this project

Add and authorize the pool

  1. In Project Settings → Agent pools, add the org pool to this project if absent.
  2. Open the pool → Security and authorize this pipeline (or all pipelines, if appropriate).
  3. Re-run; the first reference to a new pool may prompt for authorization.

How to prevent it

  • Keep pool names consistent and documented per project.
  • Authorize pools for pipelines when first wiring them.
  • Avoid referencing org pools not granted to the current project.

Frequently asked questions

What causes Azure Pipelines "Pool not found" / pool not authorized?
There are 2 common causes: pool name wrong or not in this project and pool not authorized for the pipeline. Agent pools are added to projects from the org.
How do I fix Azure Pipelines "Pool not found" / pool not authorized?
There are 2 fixes depending on which cause you have: reference the exact authorized pool name and add and authorize the pool. Work through them in order, since the first is the most common.
What does Azure Pipelines "Pool not found" / pool not authorized actually mean?
The run fails before queueing with The pool <name> does not exist or has not been authorized for use.
How do I stop Azure Pipelines "Pool not found" / pool not authorized happening again?
Keep pool names consistent and documented per project. The prevention section lists 3 changes that keep it from recurring.

Related guides

References

Not every red build is your code. Latchkey repairs the ones that are not, on the runner. Start free → 30-day trial · No credit card