322
Views
6
Comments
Impersonate User
Question

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?
2018-06-01 14-37-59
Rebecca Hall
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.
2019-05-22 11-30-09
Marcelo Ferreira
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.
2020-03-05 15-52-45
André Vieira
Staff
Hi Marcelo,

Check if this helps:
https://support.microsoft.com/kb/306158
2024-12-17 14-32-59
Matthias Preuter
 
MVP
The NetworkFileSystem has a solution to Impersonate a user within a extension.

UserImage.jpg
Jacco Kiezebrink

I know this is an old post, but I cannot find any OutSystems documentation related to the details of running an application as a different user. Is there any documentation for this for O11 or is this still planned to be done?
In particular I'm interested in how it does this, what is impersonated, and how secure this is.

UserImage.jpg
Jacco Kiezebrink

I asked the question to support who came with the following answer:

'The "Run As" option in Service Center, as you are aware, its a way to impersonate a user. This user will be stored in the database, on the ossys_espace_configuration table, the password will be encrypted using the private.key. Its also added to the web.config file.
 
For more details please check this certified forum post about information on user permissions required and how to use the Run As option if it’s really necessary to have it on the application. '

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.