List all MongoDB Users

Find User Script

The following script lists all of the users on a MongoDB server. The script includes the users’ assigned databases and their roles.

Results

The results are a list of User names, databases, and roles by database.