Impersonation in REST API ApplicationImpersonation in REST API Applicationhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1186192402024-03-29T10:08:52Z2024-03-29T10:08:52ZRE: Impersonation in REST API ApplicationChristoph Rabelhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1186567302020-03-04T08:31:01Z2020-03-04T08:31:01ZDo you attach the &doAsUserId=<ID> to the rest request? If it is there, it should work. You can get the real user id with this call:<br />long actingUserId = AuditRequestThreadLocal.getAuditThreadLocal().getRealUserId();<br />To make this more convenient, I have also created a feature request, but currently you are stuck with adding doAsUserId to each rest request.<br /><a href="https://issues.liferay.com/browse/LPS-100098">https://issues.liferay.com/browse/LPS-100098</a>Christoph Rabel2020-03-04T08:31:01ZRE: Impersonation in REST API ApplicationSarath Chandrahttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1186493212020-03-03T20:32:35Z2020-03-03T20:32:35ZCan you please elaborate, or put some code snippets? It's too hard to understand from what you said. Sarath Chandra2020-03-03T20:32:35ZImpersonation in REST API ApplicationAxel LEFEVREhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1186192392020-02-28T18:19:35Z2020-02-28T18:19:35ZHi, <br /><br />I want to get the username of the user connected to Liferay as well as the username usurped in my backend REST API Liferay application.<br /><br />I saw this information is only accessible via the ThemeDisplay object, but I cannot get the content of this object in the method of my API, it is always null.<br /><br />Is there another way to access this data? Currently I am using PortalUt