Impersonating a user
ARSetImpersonatedUser API call enables you to set the current user to be any other valid user while still running as aradmin to perform operations as that user. This user's permissions and licensing are in effect when the call to this function returns. The original user must be an administrator. This function can be helpful if you want to debug a problem and see the behavior that the user is experiencing.
ARSetImpersonatedUser call is issued, the new user's permissions and licensing take effect. When the server receives an API call with this property, the server validates that the user who is logged in is actually an administrator. The server then skips password validation and creates a user record for the impersonated user. If the call requires licenses, the server acquires the needed licenses on behalf of the user.
When the name of the impersonated user is set to
NULL, the API automatically calls the
ReleaseCurrentUser function for the impersonated user. The server switches back to the original administrator user.
You can issue the
ARSetImpersonatedUser call to impersonate a different user instead of setting the name to
NULL. The permissions and licensing of the new user take effect, and the previously impersonated user is released.
For more information, see ARSetImpersonatedUser.
You can also impersonate a user through the driver program with the
imuser command. For more information about the driver program, see Using the driver program.