# View and Revoke User Sessions

Learn how to list a user's sessions and end the sessions from the Admin UI, the API, or automatically.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

FusionAuth tracks each user's [SSO session](https://fusionauth.io/docs/authentication/sessions/how-sessions-work.md#the-sso-session) and refresh tokens. You can list and revoke both. Revoking a refresh token ends a [centralized session](https://fusionauth.io/docs/authentication/sessions/centralized-sessions.md) at the application's next check. Applications that keep their own sessions without checking FusionAuth keep running until those sessions expire.

## View a User's Sessions

Navigate to Users , select the user, and open the Sessions tab. Each row is one refresh token, with the Application, device, IP address, and expiration. The SSO session appears with an Application of `single-sign-on`.

![The Sessions tab for a user in the Admin UI.](https://fusionauth.io/img/docs/screenshots/user-session.png)

With the API, call the [Retrieve Refresh Tokens API](https://fusionauth.io/docs/apis/jwt/retrieve-refresh-tokens.md) with the user's Id. Each refresh token includes **`metaData.device`** and **`startInstant`**.

## Revoke Sessions

In the Admin UI, click Delete on a row to revoke one session. To revoke every session for the user, click Delete all sessions .

With the API, call the [Revoke Refresh Tokens API](https://fusionauth.io/docs/apis/jwt/revoke-refresh-tokens.md) with an API key. Choose the scope:

*   A refresh token Id, to end one session.
*   A user Id and an Application Id, to log the user out of one Application on every device.
*   A user Id, to log the user out of every Application on every device. Revoking by user also ends the SSO session.
*   An Application Id, to log every user out of one Application.

To revoke from a browser or a client without an API key, call [/api/logout](https://fusionauth.io/docs/apis/login/logout.md) with the refresh token. Set **`global`** to `true` to revoke all of the user's refresh tokens and the SSO session.

Revoking a refresh token doesn't end access tokens already issued. The access tokens work until the tokens expire. For how to keep that window short, see [Configure Session Lifetimes](https://fusionauth.io/docs/authentication/sessions/configure-session-lifetimes.md#set-the-access-token-lifetime).

Your code can revoke sessions in response to events. For example:

*   Revoke all of a user's sessions after a [suspicious login](https://fusionauth.io/docs/events/reference/user/login/user-login-suspicious.md).
*   Add a "Log out everywhere" button to your account page.
*   Revoke the sessions of every user in a group when the group loses access.

## Revoke Sessions Automatically

FusionAuth revokes all of a user's refresh tokens on some account changes. Navigate to Tenants -> Your Tenant -> JWT and set **Refresh token revocation** under **Refresh Token settings**:

*   **On password change** revokes after the user's password changes. On by default.
*   **On action preventing login** revokes when a [user action](https://fusionauth.io/docs/users/user-actions.md) locks the account. On by default.
*   **On multi-factor enable** revokes when the user turns on MFA. Off by default.
*   **On reuse of a one-time use token** revokes the token chain when a rotated one-time use token comes back. Off by default.

## Track Session Activity

To record when sessions start, extend, and end, subscribe a webhook to the following events:

*   [user.login.success](https://fusionauth.io/docs/events/reference/user/login/user-login-success.md), when a user logs in.
*   [jwt.refresh](https://fusionauth.io/docs/events/reference/jwt/jwt-refresh.md), when a client uses a refresh token.
*   [jwt.refresh-token.revoke](https://fusionauth.io/docs/events/reference/jwt/jwt-refresh-token-revoke.md), when a refresh token gets revoked.

Correlate the events by user Id to measure session length or count active sessions. For past logins, including logins through application-managed sessions, use the [Search Login Records API](https://fusionauth.io/docs/apis/login/search.md).

Related

[Authentication Manage Application Sessions in FusionAuth With Refresh Tokens Learn how to track and revoke application sessions in FusionAuth by tying each session to a refresh token. sessionsrefresh tokenslogout](https://fusionauth.io/docs/authentication/sessions/centralized-sessions.md)

[Authentication How Logout Works in FusionAuth Learn about what each FusionAuth logout method ends, and how front-channel logout signs a user out of every application. logoutsessionsrefresh tokens](https://fusionauth.io/docs/authentication/sessions/how-logout-works.md)

[Authentication Sessions, SSO, and Logout Learn about how FusionAuth keeps users logged in across applications, and how to configure session lifetimes, single sign-on, and logout. sessionslogoutrefresh tokens](https://fusionauth.io/docs/authentication/sessions.md)

[Authentication Limit How Many Devices a User Can Log In From Learn how to cap the number of devices a user can stay logged in on at the same time. sessionsrefresh tokenswebhooks](https://fusionauth.io/docs/authentication/sessions/limit-concurrent-sessions.md)
---

## Other pages in Sessions

> For the full index of this section, see [Authentication](https://fusionauth.io/docs/llms-authentication.txt).

- [Manage Application Sessions in FusionAuth With Refresh Tokens](https://fusionauth.io/docs/authentication/sessions/centralized-sessions.md): Learn how to track and revoke application sessions in FusionAuth by tying each session to a refresh token.
- [Configure Session and Token Lifetimes](https://fusionauth.io/docs/authentication/sessions/configure-session-lifetimes.md): Learn how to set how long users stay logged in to FusionAuth and to your applications.
- [Login Page Cookies](https://fusionauth.io/docs/authentication/sessions/cookies.md): Reference for the cookies that FusionAuth sets in the browser, including the SSO session cookie.
- [Enable SSO Across Applications](https://fusionauth.io/docs/authentication/sessions/enable-sso.md): Learn how to let users log in once and reach every application in a FusionAuth tenant without logging in again.
- [How Logout Works in FusionAuth](https://fusionauth.io/docs/authentication/sessions/how-logout-works.md): Learn about what each FusionAuth logout method ends, and how front-channel logout signs a user out of every application.
- [How Sessions Work in FusionAuth](https://fusionauth.io/docs/authentication/sessions/how-sessions-work.md): Learn about the sessions that keep a user logged in to FusionAuth and to your applications, and how the sessions relate.
- [Sessions, SSO, and Logout](https://fusionauth.io/docs/authentication/sessions.md): Learn about how FusionAuth keeps users logged in across applications, and how to configure session lifetimes, single sign-on, and logout.
- [Limit How Many Devices a User Can Log In From](https://fusionauth.io/docs/authentication/sessions/limit-concurrent-sessions.md): Learn how to cap the number of devices a user can stay logged in on at the same time.
- [Log Users Out of FusionAuth and Your Applications](https://fusionauth.io/docs/authentication/sessions/log-users-out.md): Learn how to log users out of one application or every application, and where to send users after logout.
- [Session and Token Lifetime Settings](https://fusionauth.io/docs/authentication/sessions/session-settings.md): Reference for every FusionAuth setting that controls session, token, and logout behavior.
- [Troubleshoot Sessions and Logout](https://fusionauth.io/docs/authentication/sessions/troubleshooting.md): Learn how to fix common problems with FusionAuth SSO, session lifetimes, and logout.
