# The audit log

_For tartan 0.9.36._

Every change in your organization is on the record: who made it, what it was, what it touched, and when.

Every change in your organization is on the record: who made it, what it was, what it touched, and when.

The log is append-only: no role can edit or delete an entry. Each entry is chained to the one before it, so a change
to the record would show. Entries are kept 365 days, then deleted automatically.

You need the Admin role to read it.

## 1. Read it in the console

Open **Audit**. Each row has its **Time**, **Who**, **Command** and **Target**, newest first. Narrow it with
**Anyone** (one person) and **Any command** (one kind of command, such as `device`).

## 2. Read it with the CLI

```sh
tartan audit query --org acme
```

Rows come newest first, 100 by default. Narrow them:

```sh
tartan audit query --org acme --actor user:<user id>
tartan audit query --org acme --verb device
tartan audit query --org acme --since 2026-11-01T00:00:00Z --until 2026-11-08T00:00:00Z
```

- `--actor` matches exactly: `user:<id>` for a person, `system:<name>` for Tartan's own jobs.
  `tartan user list --org acme` gives people's ids.
- `--verb` takes a command or its prefix: `device` matches every `device.*` entry.
- `--since` (inclusive) and `--until` (exclusive) take RFC 3339 times.
- `--limit` takes up to 1000 rows. To page, pass a row id: `--before <id>` pages back, newest first; `--after <id>`
  pages forward, oldest first.

Add `--json` for the stable machine-readable answer.

## 3. Verify the chain

In the console, choose **Verify the chain** on **Audit**. The footer then reads **Chain verified** with the time.

With the CLI:

```sh
tartan audit verify --org acme
```

It re-checks the organization's whole hash chain and answers how many rows it checked. Reading and verifying never ask
for a passkey.

## What lands in it

Every change made through the CLI or the console: devices approved and revoked, sites and NAT resources, firewall
rules, invites, roles, admin devices, SSO rules and settings. A change that came under one batch prompt is
recorded entry by entry.

## Check it worked

Make a change, then read the newest rows:

```sh
tartan audit query --org acme --limit 5
```

Your change is on top, with you as `user:<your id>`.

## Next

- [Admins and passkeys](admins-passkeys.md)
- [Invite people](invite-people.md)
- [SSO with Entra](sso-entra.md)
