Studio 3T’s User Manager, along with the Role Manager, simplifies tasks for MongoDB database administrators like creating users and granting roles.
Note that User Manager does not support MongoDB Atlas.
Watch the video below to learn how to add users and grant roles in Studio 3T:
Basics
To open User Manager:
- Button – Click on Users in the global toolbar
- Right-click – Right-click on any target database in the Connection Tree and choose Manage Users
Create MongoDB user

- Open User Manager and click on Add.
- Enter the username.
- Enter the password. This is a required field.
- To add optional information about the user, use the Custom Data tab and insert it in JSON.
- Click on Validate JSON to ensure that the code is correct.
- Click on Add User.
Grant MongoDB roles to a user
Choose the user and click on Grant Roles.

Find the role by entering it in the text box or choosing it from the list. Built-in roles will be marked by a yellow icon, custom roles by a green icon.
You can also choose roles from other databases on your MongoDB instance, if you want to grant access to other databases for the user.
For our example, we will simply make our new user an administrator of their database and also grant them read-write access to it by selecting the roles dbOwner and readWrite.
Click Grant to grant access.
Grant roles to multiple users at once
In MongoDB, users are defined for specific databases. Each user is then assigned a list of roles that in turn define the user’s privileges.
MongoDB’s API makes it easy to assign a user a list of roles via the grantRolesToUser method:
db.grantRolesToUser( "<username>", [ <roles> ], { <writeConcern> } )
However, MongoDB’s role API doesn’t directly cover another common use case where you want to assign a newly created role or multiple roles to a list of users in one go.
With Studio 3T, you can grant roles to multiple users at once.
Let’s consider the following example. Say you have just created a new role rwAdmin on database test that makes users dbAdmins on that database and also lets them read from and write to it. You now want to assign this new role and the existing role userAdmin to a group of users.
Connect to your MongoDB server as a user that has sufficient privileges to grant roles to users, select the database where your users are defined, and click the Users button in the global toolbar to open the Users tab for that database.
You will now see a list of all your users in the selected database. Simply select all users that you want to grant those roles to and click the Grant Roles button.

Now, select from the list of available roles those that you want to grant to your list of selected users, and click Grant.
Edit a user
- Open User Manager and select the user.
- Click on Edit to open the user profile and make changes as needed.
- Click on Update User.
Delete a user
- Open User Manager and select the user.
- Click on Drop to drop the user.
- Click on Yes to confirm.
This article was originally published by Thomas Zahn and has since been updated.