Impersonate User

Is it possible to impersonate a AD User inside an extension? I dont want to use the Outsystem funcionality of Run As. I'm able to impersonate a Local user of the machine where the plataform is installed but for some reason i'm not able to impersonate a AD User. 

Anyone have a solution for this?
We use this type of functionality as follows:
The person is still logged in as themselves (session.userid).  If they "switch" to a different person that they have proxy access for, then we store this user id in another session variable (session.effectiveuserid).  We have an action that we include on every page since this is used across espaces that returns the effective user id.  Then on the page if we want the actual user we use session.userid, otherwise we use session.effectiveuserid.  We allow users to proxy for someone else based on either all espaces or a specific espace.  We set both of these ids when the user is logging into an espace from a common login page.

A couple of catches that we just recently found was that the current user still needs the same roles as their proxy in order to access pages within an espace.  Also, if you switch to your proxy then switch to an espace in which they don't have access, then that person looks like they are getting access to an espace that they shouldn't have access for.  We're still working on resolving these issues.
I don't want to run as other user of the application. i want to the extension run with other user since the user i want is only with permissions to change permissions on folders. But i want to do this without using outsystems run as.
Hi Marcelo,

Check if this helps:
The NetworkFileSystem has a solution to Impersonate a user within a extension.