This article explains the methods to get the full list of users in Mongodb.
We can achieve the same using any of the following queries.
Method1: Using getUsers()
Method2: Using show
Both the quries will give the same kind of output and can use any of this according to the convenience.