How can I list all users using firebase admin sdk

vincent nyanga picture vincent nyanga · Dec 7, 2016 · Viewed 14.3k times · Source

Is there a way to list all the users using the firebase admin sdk? Documentation only shows getting one user either by uid or email.

Answer

webp picture webp · Oct 23, 2017

The latest firebase-admin sdk (as of now version 5.4.2) has listUsers API that would do that. The example is here.

One thing to add to the example, the nextPageToken has to be omitted or a valid userid. (IMO, it's not obvious in neither the example or the API doc.)