# Remove user access

How to remove selected users from the current group, including confirmation, partial-failure handling, and protection constraints.

Audience: [Group admin](/help/by-role/group-admin/)

## Who is this for

Group admins who need to revoke access for selected users.

## Outcome

You can remove selected users from the current group and correctly interpret full success, partial success, and protected-user rejection outcomes.

## Before you start

- You are signed in.
- Correct group is selected.
- DELETE rights for users are available.

## What this flow actually does

Remove access is a table action followed by a confirmation step and one batch service call.

The important part is not only the confirmation itself, but also the fact that the service can:

- remove some selected users,
- reject some selected users,
- or fail the whole request.

The UI is built to preserve that difference.

## Steps

1. Select one or more users in the table.
2. Click Remove access.
3. Read the confirmation prompt carefully.
4. Confirm the removal.
5. Wait for the service response.
6. Review the table refresh and snackbar result.

## Before the confirmation

The remove action is controlled first in the table layer.

What matters before you click it:

- the button is disabled when no users are selected,
- the button is shown only when current access includes user-delete rights,
- self-user rows are protected in selection logic,
- search-tree/subgroup mode can affect selection behavior in the surrounding list flow.

This means many invalid operations are blocked before the confirmation is even shown.

## Confirmation behavior

The action uses a direct confirmation prompt before calling the backend.

Practical implication:

- if you dismiss the confirmation, no change is made,
- if you confirm, the selected user IDs are sent in one batch request.

There is no intermediate review wizard here. The protection relies on prior selection visibility and explicit confirmation.

## What happens after submit

After confirmation, the UI sends:

- current group id,
- selected user ids.

The response is handled as two result sets:

- `passed`: users successfully removed,
- `rejected`: users not removed, each with a reason code.

If removal succeeds fully:

- removed users disappear from the table,
- a success snackbar is shown,
- current selection is cleared.

If removal succeeds only partially:

- only successfully removed users disappear from the table,
- rejected users stay visible,
- the snackbar shows removed count, not-removed count, and detailed per-user reasons,
- current selection is cleared after handling.

If the request fails completely:

- the request-failed snackbar is shown,
- the table stays unchanged.

## Protection constraints and typical rejection reasons

This flow is important because not every selected user can necessarily be removed.

Typical reasons surfaced by the surrounding translation layer include:

- `GROUP_NO_OWNER_LEFT`
- `CANNOT_MANIPULATE_MYSELF`
- `USER_NOT_EXIST`
- other backend/user-access consistency errors

Operationally this means:

- removing the last owner may be blocked,
- removing yourself may be blocked,
- stale selections can fail if the target user state changed meanwhile.

## Practical checks

- Remove action is disabled when no users are selected.
- Cancelling the confirmation produces no change.
- Fully removed users disappear from the table.
- Rejected users remain in the table.
- Partial remove shows per-user reason details in the snackbar.
- Current user cannot remove themselves through the normal table selection flow.

## Common issues

- Remove blocked: no delete rights or no selection.
- Confirmation dismissed: no change is applied.
- Only some users are removed: read rejection details for protected or invalid targets.
- Removal of an owner fails: the backend may be preventing a no-owner-left state.
- Request failed snackbar appears: the batch call did not complete at all.

## Related use cases

- [Access users tab](/help/groups-tabs-access-users/)
- [Users update access](/help/groups-access-users-update-access/)
- [Users move users](/help/groups-access-users-move-users/)

## Support handoff

If remove access fails, include content_id, group id, selected user ids or e-mails, whether the result was full or partial, and all rejection reason messages shown.
