Remove Active Session in Cloudflare Zero Trust

As system administrators, maintaining the integrity of our network security is paramount on your Company Infra or Your homelab. There are scenarios where immediate action is required to revoke access—such as responding to a security incident, handling a compromised account, Co-worker resignation or enforcing a policy change.

Cloudflare Zero Trust provides administrators with granular control to terminate sessions effectively. Below are the two primary methods for revoking access tokens: Per-User and Per-Application.

-Revoking Access Per-User

If you need to remove access for a specific individual without affecting other users, follow these steps:

  1. Navigate to the Zero Trust dashboard.
  2. Go to Team & Resources and select Users.
  3. Locate the target user in the list and check the box next to their name.
  4. Click on the Action button located above the list.
  5. Select Revoke from the dropdown menu.

This action immediately invalidates the user's active tokens, forcing them to re-authenticate to regain access.

-Revoking Access Per-Application

In cases where a specific application has been compromised or requires a mass logout for all connected users, you can revoke tokens for the entire application:

  1. Navigate to the Zero Trust dashboard.
  2. Go to Access controls and select Applications.
  3. Click on the specific application you wish to manage.
  4. Click the Configure button.
  5. Select the option Revoke existing tokens.

Note: This action will immediately terminate the sessions of all users associated with that specific application, effectively kicking them out instantly.4

Reference