---
summary: auth_expired means the token is missing, wrong or expired; policy_denied
  means the caller's role does not allow the tool.
title: An agent call fails with policy_denied or auth_expired
path: troubleshooting/agent-denied
status: published
---

# An agent call fails with policy_denied or auth_expired

## auth_expired

The gateway could not accept the token: none was sent, it is not a ScaiKey
access token, it was issued for another application, or it expired. Send
`Authorization: Bearer <token>` with a fresh ScaiKey token issued for
ScaiGit; see [Connecting an agent](/docs/scaigit/guides/agents#getting-a-token).

## policy_denied

The token was fine, but the caller's role in the instance's policy does not
allow this tool, or the policy hides its whole domain. Tiers are fixed:
an administrator can grant a role the tool, but cannot make the tool less
sensitive. Ask your administrator which role you or your agent have.

## scope_insufficient

The caller is allowed the tool, but lacks the rights on this repository or
organisation in the forge itself (for example writing to a repository your
team cannot write to).
