Legacy Knowledge Base
Published Jun. 30, 2025

The Impersonation Attempt Fails Without Errors in the Logs or UI

Written By

Emma Carr-Gardner

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Admin users are unable to impersonate other users.
  • When attempting to impersonate, a new tab opens, but it remains on the original user.
  • Impersonation attempts fail, the `doAsUserId?` is missing from the URL.

Environment

  • Liferay DXP 7.4 +

Resolution

  •  Start the bundle and navigate to Control Panel > Instance Settings >> Instance Configuration >> General, you'll notice two fields:
    • Home URL
    • Default Logout Page
  • These URLs can use a servlet that is mapped to a Friendly URL Servlet like `/web/*`

  • These URLs should not be mapped to need to a servlet mapped to a Main Servlet, as defined in shielded-container-web.xml

    <servlet-mapping> <servlet-name>Main Servlet</servlet-name> <url-pattern>/c/*</url-pattern> </servlet-mapping>
  • This is the same for the portal-ext.property `portal.impersonation.default.url=`

    Using /c/*, the impersonation request will not be completed. A new tab opens, but remains on the “users and user group” page as the original account.  See the following tests:

     

    ❌ Scenario 1:
    portal.impersonation.default.url= /c/portal/login
    Home URL = /c/portal/login

    ❌ Scenario 2:
    portal.impersonation.default.url= /c/portal/login
    Home URL = empty

    ❌ Scenario 3 (client’s setup, verified)
    portal.impersonation.default.url=/web/guest
    Home URL = /c/portal/login

    ✅ Scenario 4:
    portal.impersonation.default.url=/web/guest
    Home URL =/web/guest

    ✅ Scenario 5:
    portal.impersonation.default.url=/web/guest
    Home URL = empty
  • After removing /c/portal/login from the “Home URL” and “Default Logout Page”, the administrator should be able to impersonate other users. 
Did this article resolve your issue ?

Legacy Knowledge Base