NextCloud user reporting via occ only reports first 500 users

Hi. Using NC20, with about 650 users with accounts held in the applicationā€™s database. No paid-for support.

We recently ran two occ reports both of which generate lists of users. Report output saved to JSON files. Report AAAA gives one line per user (username and display_name) while BBBB gets all the user details.

  • AAAA: sudo -u www-data php occ user:list --output=json_pretty
  • BBBB: sudo -u www-data php occ user:list --info --output=json_pretty

Curiously both reports only included data for 500 users - and (strange but true) it was not the same 500 users each time. We have about 650 users so quite a few missed out.

Is this a known issue? Surely unlikely relevant to iicensing because the most important functionality, web interface to users etc are all working fine.

But exactly 500 users feels like some arbitrary limit somewhereā€¦

Wisdom always welcome.
Thanks

There should be a ā€˜limitā€™ parameter to set a limit, the default value for this option is 500 :slight_smile:

1 Like

As @Chartman123 already wrote, there is a limit which can be overwritten on the command line:

> ./occ user:list --help
Description:
  list configured users

Usage:
  user:list [options]

Options:
  -l, --limit[=LIMIT]    Number of users to retrieve [default: 500]
  -o, --offset[=OFFSET]  Offset for retrieving users [default: 0]
      --output[=OUTPUT]  Output format (plain, json or json_pretty, default is plain) [default: "plain"]
  -i, --info             Show detailed info
  -h, --help             Display this help message
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi             Force ANSI output
      --no-ansi          Disable ANSI output
  -n, --no-interaction   Do not ask any interactive question
      --no-warnings      Skip global warnings, show command output only
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Thanks very much.
I will write a few sentences suggested additions to the Admin manual help section on occ. I think that both ā€œā€“limitā€ and ā€œā€“offsetā€ could use a few more words of explanation.

Also thanks.