Cockpit can't access systemd user units; how to solve it?

I installed Cockpit and set it up:

services.cockpit = {
  enable = true;
  port = 9090;
  openFirewall = true;
};

It can’t access systemd user units of services, targets, sockets, timers, and paths:

Loading of units failed
Listing units failed: not-found

The problem occurs on both Administrative and Limited access.

How can I solve this issue?