> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackshift.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Who can access this? and unused access

> See every person, token, agent and automation that can reach a resource and why, and remove access nobody has used in 90 days.

> [!TIP]
>
> **Live.** This area is documented as current, user-reliable behavior.

## Goal

Review and trim access to a resource or a whole team.

## Prerequisites

* Access to the resource. Owner or Admin to change access.

## Workflow

**Step 1**

On a database overview, choose Who can access this?.

**Step 2**

Read each row: who, whether they can read, change or delete, via which role or policy, and when they last used it.

**Step 3**

Choose Limit or Remove on a row, or Give someone access to add a limited role on this resource.

**Step 4**

For the whole team, open team settings, Audit, Unused access.

## Who can access this?

* Groups: People, Tokens, Agents and Automations.
* Agents show who connected them: an agent can never do more than that person.
* Open in Audit shows what each one did.
* The same answer is in the API: GET /api/v1/access/resources?resource=database:\<id>.

## Unused access

* A role or token is listed when nothing it allows has been used for 90 days. Owners are never listed.
* Remove one row, or Remove all. Each stops working at once and its holder is told. People stay on the team with everything else they have.
* API: GET /api/v1/teams/\{teamId}/access/unused and POST /api/v1/teams/\{teamId}/access/unused/remove.

## Expected result

> [!TIP]
>
> Only the people, tokens, agents and automations that need a resource can reach it.

## Related guides

> [card] [Custom roles and limited access](https://docs.stackshift.cloud/team-and-access/custom-and-limited-roles.md)
>
> Build a team role from any set of actions, or give someone a role on only one project, database or other resource, optionally for a limited time.

> [card] [Team audit log and export](https://docs.stackshift.cloud/team-and-access/audit-log.md)
>
> See everything people, tokens, agents and automations changed in a team, and everything they were refused. Export CSV or JSON, or stream it through Events.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.