View and filter audit logs
Find a permission decision your policy decision point (PDP) made, and read why it allowed or denied the request. This page is for developers who debug a permit.check() call that returned an unexpected result.
Prerequisites
- A PDP that has served at least one
permit.check()call. See Run the PDP. - Access to the Permit environment the PDP runs against. See Projects and environments.
- For the API calls on this page: an environment API key. See Get your API key.
View audit logs in the dashboard
- Sign in to the Permit dashboard and select the environment your PDP uses.
- Open the Audit Log screen. Each row holds the timestamp, the user, the action, the resource type, the tenant, and the decision.
- Select a row. The decision log for that check opens next to the list.
If the screen shows no entries, see Troubleshoot missing audit logs.
Filter audit logs
On the Audit Log screen, filter entries by user, date, decision, and tenant. Filtering by user and by decision is the fastest way to find a denial for one user.
List audit logs with the API
To filter audit logs from a script, call the List audit logs endpoint. Replace <YOUR_API_KEY> with your environment API key, and {proj_id} and {env_id} with your project and environment keys or IDs.
This request returns the denied checks for one user in the default tenant:
curl -G 'https://api.permit.io/v2/pdps/{proj_id}/{env_id}/audit_logs' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
--data-urlencode 'users=john@permit.io' \
--data-urlencode 'decision=false' \
--data-urlencode 'tenant=default' \
--data-urlencode 'per_page=10'
The response holds one object per check in data, the number of matching entries in total_count, and the number of pages in page_count. Each entry also carries the org_id, project_id, and env_id of the check:
{
"data": [
{
"id": "6f1c3a2e-6e24-4f3f-9b7a-5a9c0d8e1f22",
"timestamp": "2026-02-11T08:24:19+00:00",
"user_key": "john@permit.io",
"user_email": "john@permit.io",
"action": "delete",
"resource_type": "task",
"tenant": "default",
"decision": false,
"pdp_config_id": "0b0e3a49-1e2f-4a8c-9d21-6f3b7c8a4e15"
}
],
"total_count": 1,
"page_count": 1,
"pagination_count": 1
}
Available filters: users, decision, resources, action, tenant, pdp_id, timestamp_from, timestamp_to, and query (check, get_user_permissions, or get_authorized_users). Page through results with page and per_page: per_page defaults to 30 and accepts up to 100. To read the full decision log of one entry, call GET /v2/pdps/{proj_id}/{env_id}/audit_logs/{log_id} with the id from data.
Read a decision log
A decision log shows the input the PDP received and the result that Open Policy Agent (OPA), the policy engine inside the PDP, returned. The Permit policy that runs in OPA adds a human-readable reason that explains the result.

This reason is from a denied check where no attribute-based access control (ABAC) rule grants the user the delete permission on a task:
{
"reason": "user 'c2fc4a07-7edf-48fb-8fd8-e4989e103a77' does not match any rule that grants him the 'delete' permission on the given resource of type 'task'"
}
The decision log includes the reason when Debug Mode is on. Next to the reason, the decision log has a code that names the cause of a denial, and a support_link to the page that explains it.
Denial codes in decision logs
| Code | Meaning |
|---|---|
no_such_resource | The resource type in the check doesn't exist. |
no_such_action | The action isn't defined on the resource type. |
no_such_tenant | The tenant in the check doesn't exist. |
user_not_synced | The user key doesn't match any user in Permit. |
no_user_roles | The user has no role in any tenant. |
no_role_in_tenant | The user has roles in other tenants, but not in the checked tenant. |
no_permission | None of the user's roles grants the action. |
no_matching_usersets | The user matches no ABAC user set. |
no_matching_resourcesets | The resource matches no ABAC resource set. |
no_matching_rules | No ABAC rule grants the action between the matched sets. |
cloud_pdp_not_supporting_abac | The check reached the Cloud PDP, and the environment uses ABAC. |
Where audit logs come from
Each permit.check() call that reaches a PDP creates one audit log entry. You don't add logging code. The entry combines the check (user, action, resource, tenant) with the policy the PDP evaluated.
The PDP uploads decision logs to Permit by default, for container PDPs and the Cloud PDP. To see decisions outside the Permit dashboard, use one of these options on a container PDP:
- Print each decision to the container output with
PDP_OPA_DECISION_LOG_CONSOLE. See Print decisions to the console. - Send decision logs to Elasticsearch or stdout with the logs forwarder.
Audit log entry compared with decision log
| Audit log entry | Decision log | |
|---|---|---|
| What it holds | One row per check: timestamp, user, action, resource type, tenant, and the true or false decision | The full record of one check: the input the PDP received, the result OPA returned, and the reason and code for the result |
| Where you see it | The list on the Audit Log screen, and the data array of GET /v2/pdps/{proj_id}/{env_id}/audit_logs | The panel that opens when you select a row, and GET /v2/pdps/{proj_id}/{env_id}/audit_logs/{log_id} |
Audit log retention
Permit stores audit logs for a limited time, so a check from far in the past can be missing from the Audit Log screen and from the API. To find out the retention period for your account, or to keep logs longer, contact Permit on Slack or at help@permit.io. To keep decisions in your own systems, forward them with the logs forwarder.