Find out what happened with events
Use the project's events to find out why a user could not sign in, follow one sign-in from start to end, and list the API requests that failed.
Zitadel records what happens in a project as events: each sign-in check, session, token, configuration change and API request. An event names what happened, when, the user it concerns, and who acted. This guide reads them with zitadel event list to answer three questions: why a user could not sign in, what one sign-in did, and which requests failed.
The console's Events screen lists the same events. Events is the API behind both.
Before you start
- A project from
zitadel setup(Quickstart). Run the commands in your app's directory: they use the server, project and credentials setup wrote, likedeploydoes. - The user's ID. Find it by the user's identifier, such as their email:
npx @zitadel/cli@latest user list --filter identifier=starts_with:dana@example.com id identifier status created_at
────────────────────────────────────────────────────────────────────────────────────
user_01M8Q08C80EYZTK4ESXXHQZT8A dana@example.com active 2026-11-30T19:52:36ZThe console shows the same ID on the user's page under Users.
Read the output
event list prints the newest events first, 20 to a page. These flags shape it:
--filter <field>=<value>narrows the list. Repeat it to combine fields. Repeatingcategory,event_type,operation_idorstatus_classwidens that field instead: it matches any of the values.--fieldspicks the columns, as comma-separated paths into the event, such aspayload.check_type.--allfetches every page. A filtered page can hold fewer events than--limit, or none, while more remain: pass--allbefore you conclude that nothing matched.--jsonreturns the events whole, underdata.items, for a script or an agent.
event list lists every filter. Each event carries a few IDs that link it to others:
| Field | What it links |
|---|---|
user_id | The user the event concerns, whoever acted: the user a session, token, sign-in check or credential belongs to, or the user a change was made to. |
actor_id | Who acted: the signed-in user who sent the request. A change made with the project secret, such as a deploy, has no actor_id and actor_type service. |
correlation_id | One piece of work across its requests: a sign-in from its first step to the session and token it ends with, an invitation and its answer, or a project claim. |
request_id | One HTTP request and everything it wrote. |
Events never hold passwords, passkey challenges or token values.
Find out why a user could not sign in
List the user's sign-in events with the type of each check:
npx @zitadel/cli@latest event list --filter user_id=<user-id> --filter category=auth --fields occurred_at,event_type,payload.check_typeFor Dana, who signed up with a password and later mistyped it twice:
occurred_at event_type check_type
──────────────────────────────────────────────────────────────────
2026-11-30T19:53:02.441Z auth.token.issued
2026-11-30T19:53:02.434Z auth.attempt.handed_off
2026-11-30T19:53:02.434Z auth.check.succeeded Password
2026-11-30T19:53:00.414Z auth.check.failed Password
2026-11-30T19:52:54.241Z auth.check.failed Password
2026-11-30T19:52:49.372Z auth.check.succeeded User
2026-11-30T19:52:42.162Z auth.token.revoked
2026-11-30T19:52:36.389Z auth.token.issued
2026-11-30T19:52:36.382Z auth.attempt.handed_off
2026-11-30T19:52:36.38Z auth.check.succeeded User
2026-11-30T19:52:36.38Z auth.factor.password.set
Found 11 events · project proj_01M8Q06XGXCBGQDKYVPYBMVTP7 on localhost:8080Read it from the bottom up:
auth.factor.password.setis the password Dana chose at sign-up.auth.check.succeededwithUsermeans the login found her account by her email.- Each
auth.check.failedwithPasswordis a password that did not match. auth.attempt.handed_offandauth.token.issuedmean the sign-in finished and your app got its token.auth.token.revokedis a sign-out.
Common patterns, and the fix for each:
- Failed
Passwordchecks, and noauth.factor.password.setat all. The user signed up another way, such as with a passkey (auth.factor.passkey.enrolled), and never set a password. Ask them to sign in with their passkey, or set a password for them. - Failed
Passwordchecks after a password was set. The user forgot it. Set a new password for them. - No events at all. The login never found the account: the user typed another identifier, or signed up in another project. Search for them with
user listas in Before you start.
Without --filter category=auth, the list also holds the user's sessions and the changes made to the account, whoever made them. To see what the user did instead, filter on who acted:
npx @zitadel/cli@latest event list --filter actor_id=<user-id> --fields occurred_at,event_type,categoryFollow one sign-in by its correlation ID
Every event of one sign-in shares a correlation_id, from the first step of the login flow to the session and token it ends with. Take it from any of the sign-in's events:
npx @zitadel/cli@latest event list --filter user_id=<user-id> --filter event_type=auth.check.failed --limit 1 --json{
"event_type": "auth.check.failed",
"id": "evt_01M8Q093QYJRT60ST9V119MDH7",
"category": "auth",
"occurred_at": "2026-11-30T19:53:00.414Z",
"user_id": "user_01M8Q08C80EYZTK4ESXXHQZT8A",
"request_id": "req_01M8Q093PZDF1CQXZJY0GHFCV0",
"session_id": "sess_01M8Q08M5HK3NTABQV41VH9P9F",
"flow_id": "flow_01M8Q08M5J0B1MZ3HWEJ5ZVAYJ",
"correlation_id": "corr_b9fd10b899ba2ccd3f0fa8e837f9594d",
"payload": {
"check_id": "ch_01M8Q093PZ1EN489TV2H7VV5E9",
"check_type": "Password",
"auth_attempt_id": "att_01M8Q08M5J0B1MZ3HWEM3NH4F7"
}
}The output above is one item of data.items, cut to the fields this guide uses. List everything that sign-in wrote, oldest first:
npx @zitadel/cli@latest event list --filter correlation_id=<correlation-id> --sort occurred_at:asc --fields occurred_at,event_type,payload.check_type,payload.operation_id,payload.status occurred_at event_type check_type operation_id status
────────────────────────────────────────────────────────────────────────────────────────────
2026-11-30T19:52:44.466Z auth.attempt.created
2026-11-30T19:52:44.465Z request.api createFlow 201
2026-11-30T19:52:49.372Z auth.check.succeeded User
2026-11-30T19:52:49.371Z request.api submitFlowStep 200
2026-11-30T19:52:54.241Z auth.check.failed Password
2026-11-30T19:52:54.203Z request.api submitFlowStep 400
2026-11-30T19:53:00.414Z auth.check.failed Password
2026-11-30T19:53:00.383Z request.api submitFlowStep 400
2026-11-30T19:53:02.434Z auth.check.succeeded Password
2026-11-30T19:53:02.434Z auth.attempt.handed_off
2026-11-30T19:53:02.441Z session.established
2026-11-30T19:53:02.441Z auth.token.issued
2026-11-30T19:53:02.398Z request.api submitFlowStep 200
2026-11-30T19:53:02.441Z request.api exchangeHandoff 200
Found 14 events · project proj_01M8Q06XGXCBGQDKYVPYBMVTP7 on localhost:8080Each request.api event is one API request of the sign-in, with its operation and HTTP status. Its occurred_at is when the request arrived, and it is stored when the request ends, so it can sit a row away from the events it caused. Each step of the login flow is one submitFlowStep request. The two that answered 400 are the wrong passwords.
An event whose request was the whole of its work, such as a configuration change, has no correlation_id. Filter on its request_id instead:
npx @zitadel/cli@latest event list --filter request_id=<request-id>List the requests that failed
Every API request is a request.api event with its HTTP status. List the ones that failed, with the client errors and the server errors together:
npx @zitadel/cli@latest event list --filter status_class=4xx --filter status_class=5xx --fields occurred_at,payload.operation_id,payload.status,correlation_id occurred_at operation_id status correlation_id
────────────────────────────────────────────────────────────────────────────────────────────
2026-11-30T19:53:00.383Z submitFlowStep 400 corr_b9fd10b899ba2ccd3f0fa8e837f9594d
2026-11-30T19:52:54.203Z submitFlowStep 400 corr_b9fd10b899ba2ccd3f0fa8e837f9594d- Add
--filter operation_id=<operation>, such ascreateUser, for one operation. The API reference names each operation's ID. - Add
--filter created_at=greater_than_or_equal:<RFC 3339 time>, such as2026-11-30T08:00:00Z, for the failures since then. - Follow a failure's
correlation_idas in Follow one sign-in to see the whole sign-in it belonged to.
A request.api event also carries metadata.client: the caller's IP address, user agent and origin. Read it with --json. A request an AI agent made through the server's MCP endpoint (/api/v1/mcp) carries metadata.invoked_by: "mcp", so an agent's calls can be told from the same credential's direct calls:
npx @zitadel/cli@latest event list --filter event_type=request.api --fields occurred_at,payload.operation_id,payload.status,metadata.invoked_byOn the local runtime, the server's log says why a request failed: run npx @zitadel/cli@latest logs --follow while you repeat it (Run Zitadel locally).
Find what a policy refused
When a project's password policy refuses a password, or its sign-up policy refuses a sign-up, the server writes a policy.evaluate.denied event. List them with the operation and the rule each one broke:
npx @zitadel/cli@latest event list --filter event_type=policy.evaluate.denied --fields occurred_at,payload.operation,payload.violations,user_id,request_id occurred_at operation violations user_id request_id
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2026-12-01T17:17:48.904Z auth.factor.password.set {"min_length":15} user_01M8S9SCJ90DC66ZHHKFX0EE73 req_01M8S9SNF7AKQBXYFTQYTND6N3- The list holds the refusals of both policies.
payload.operationsays which one refused:auth.factor.password.setis a password the password policy turned down,user.createa sign-up. The policy that admits OAuth clients by their metadata document (auth.client.admit) records no decisions. payload.violationsholds each rule that failed with the policy's setting for it, never the password or its length.payload.revision_idnames the policy revision that decided.user_idis set when the user exists. A sign-up names none, since its user is not created yet: follow itscorrelation_idas in Follow one sign-in.- For one policy alone, such as the password policy, take its ID from
npx @zitadel/cli@latest policy list --fields id,operationand add--filter entity_id=<policy-id>to the command. - Add
--filter user_id=<user-id>for one user's refusals. - A password the login form turns away for its length never reaches the password policy, so it writes no event.
The event records what the policy decided, and is written separately from the request: one can be missing when the database did not answer. On a server you run yourself, the setting events.policy.decisions (NEXTGEN_EVENTS_POLICY_DECISIONS) chooses what is recorded: deny, the default, records refusals; all also records each operation a policy admits, as policy.evaluate.allowed; none records neither.
Find out who changed the configuration
A deploy writes an event for each resource it changes, such as policy.updated for a policy, then release.created and deployment.created. For the password policy:
npx @zitadel/cli@latest event list --filter event_type=policy.updated --fields occurred_at,payload.operation,payload.config,request_id occurred_at operation config request_id
──────────────────────────────────────────────────────────────────────────────────────────────────────────
2026-11-30T19:54:20.093Z auth.factor.password.set {"min_length":16} req_01M8Q0BHHWZ04Y7AFMHN1E2C7GA deploy authenticates with the project secret, so its events name no person: their actor_type is service. The release names the change instead: its message and the commit it was built from. List the deployments with why each happened:
npx @zitadel/cli@latest deployment list --fields metadata.reason,metadata.message,deployed_atThen read the release a deployment made live with release get <release-id>: metadata.git_sha is the commit, and git log names its author. Deploy shows the history and how to roll a change back.
Check it works
Sign in to your app with a wrong password, then run the command from Find out why a user could not sign in with your own user ID. The newest rows are an auth.check.failed with Password, and its occurred_at is the time you tried.
Send events to your own tools
On a server you run yourself, set a webhook in the server's configuration, and the server delivers each event to it as it stores it. Retention deletes events by age, 30 days by default. Event webhooks shows the setting and has a page per event type, with its payload.
Was this helpful?