Page 1 of 1

User Impersonation

Posted: Thu Jun 11, 2020 5:19 pm
by dutil
Hello,

Is there a way to impersonate a user within the API?
We have a service running with an admin account that updates certain orders on behalf of a few users.
We would like to have the user who triggered the change show up as the active user when calling code in the OrderSaving/Saved events on our server package.

Is this possible?

Re: User Impersonation

Posted: Thu Jun 11, 2020 7:47 pm
by BobRichards
Server packages run as the administrator. There is no way to change this.

The only way for a server package to impersonate a user is to create another SelectServer instance by logging in with the user credentials. This means the server must know the username/password for the user and it would consume a license for the duration of the session. This is not advised.