There are times when customers need help with their orders, and that requires the store admin to investigate the issue under the customer’s view. From Magento 2.4, the Magento 2 Login as Customer feature has been made available for both open source and enterprise versions of Magento.

Enable Magento 2 Login as Customer

Enable the feature

  1. In the admin page click Stores -> Settings -> Configuration.
  2. In the left panel, expand Customers and choose Login as Customer.
Magento 2 login as customer: settings

Describe the fields in config

OptionValueDescription
Enable Login as CustomerYes / NoEnable/Disable the Login as Customer feature
Disable Page Cache For Admin UserYes / NoIf Yes, the page cache will be disabled for the admin user.
Store View To Login ToAuto-Detection (default) / Manual selectionAutomatic uses the default store setting for that company user. Use Manual Selection if you want the Admin user to select the store view when logging in as a customer.

3. When complete, click Save Config and Clear Cache

Using Login as Customer

Login as Customer allows you to see the site just as the customer does, and allows you to troubleshoot and take other actions as the customer. This feature requires an admin account with access to Customers > Login as Customer in their role.

From Magento 2.4.1 onward, customers will also have to enable Allow remote shopping assistance from their Dashboard before an admin can log in:

magento 2 login as customer: edit account info

If a customer has not enabled this option, then when an admin tries to log in to their account, an error message will be displayed: “The user has not enabled the "Allow remote shopping assistance" functionality. Contact the customer to discuss this user configuration.

To skip this extra step, store administrators can disable the module LoginAsCustomerAssistance via command line:

php bin/magento module:disable Magento_LoginAsCustomerAssistance

then redeploy the site.

Login as Customer appears on the following pages:

  • Customer Edit Page
  1. On the Admin sidebar, go to Customers -> All Customers.
  2. Find the customer in the grid and click Edit in the Action column.
  3. On the top control bar, click "Login as Customer"
Magento 2 login as customer: customer edit page
  • Order View Page
  1. On the Admin sidebar, go to Sales -> Orders.
  2. Find the order in the grid.
  3. In the Action column, click View.
  4. Click “Login as Customer
Magento 2 login as customer: order view page
  • Invoice View Page
  • Shipment View Page
  • Credit Memo View Page

Admin connection will display on the header. Close session button will end the login session clear related caches

Magento 2 login as customer: My Account

READ MORE. How to add custom fields to the Customer Registration page in Magento 2