When building, testing, and deploying an application with TeamCity, you may need to run a build under a specific user account, different from the one used to run the build agent.
The teamcity-runas plugin can be used to run TeamCity build steps under a specified user account on Windows, Mac or Linux. See Wiki for more information:
See also announcement blog post.
The plugin is compatible with TeamCity 10.0 and later.
JetBrains runAs plugin for TeamCity is under the Apache License.