Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

auth.admin.listUsers() only lists up to 50 users #538

Description

@skoshx

Bug report

Describe the bug

When using auth.admin.listUsers(), it only returns 50 users, even though in the auth.users there are over 70+ users. This caused a massive fire couple days ago on our production site, when paying customers were faced with errors, since our backend relied on listUsers to find them by their email.

To Reproduce

Here is the code snippet we use to find users by their email:

async function getUserByEmail(email: string) {
	const { data: { users } } = await getSupabaseServiceRole().auth.admin.listUsers();
        // users.length === 50 here, even though there are over 70+ registered users, as can be seen in the supabase dashboard.
	if (!users) return undefined;
	return users.filter((user) => user.email === email)?.[0];
}

Expected behavior

listUsers() is expected to return all registered users, as the documentation says.

System information

  • OS: macOS
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: 2.1.0
  • Version of Node.js: v16.14.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions