How to Create Admin User in Magento 2?

Since Magento is a complex platform, it might be hard to cover all the sections on your own. You need to create other Magento admin users who will manage products, monitor orders and create email templates, etc.

However, you must grant each user access only to certain areas of your store to ensure high admin panel security.

So today you'll learn how to create admin users in Magento and monitor their actions in the admin panel.

Magento 2: Create Admin User in the Admin

1. Go to Admin Panel > System > Permissions > All Users and press the Add New User button.

Magento 2 New Customer,Add New Customer

3. Fill out the new user Account Information:

  • Set the User Name that will be used during login, and specify the First and Last Names.
  • Enter the user's Email.
  • Create a Password, and confirm it in the Password Confirmation field.
  • Choose the language of the admin panel interface for the user in the Interface Locale.

Note: we recommend choosing English since Magento has some issues in other locales. If you choose some other language make sure you install a language pack of your preference.

  • Active new user in the This account is select box.

Magento 2 New User,Account Information

4. Enter your password (password of a user you are logged in under) in the Your Password field.

Magento 2 New User,Password

5. Go to the User Role section and choose the role you want to assign to this user. That's where you grant Magento 2 admin user access to different areas of your store.

Magento 2 New User,User Role

 Don't forget to Save the new Magento 2 admin user once you finish. 

Magento 2: Create Admin User via Command Line

If you're confident working with code, you can also create admin user in Magento 2 via CLI. For that:

  1. Open a command line and navigate to your Magento 2 root directory.
  2. Execute the following CLI command:
php bin/magento admin:user:create --admin-user="USER_USERNAME" --admin-password="USER_PASSWORD" --admin-email="USER_EMAIL" --admin-firstname="USER_FIRSTNAME" --admin-lastname="USER_LASTNAME"

e.g.: php bin/magento admin:user:create --admin-user="jondoe" --admin-password="asdAdnkjois97dtasdas" --admin-email="jon.doe@gmail.com" --admin-firstname="Jon" --admin-lastname="Doe"

Track Admin Users' Activity

Although you grant users access to certain store sections, you might still need to track their actions. What orders they view, what customers they delete or create and what settings they edit.

magento activity log

Simply configure the Magento admin action log and make sure no one violates your Magento security.