You can configure the TeamCity service account to run under the account of the corresponding privileged domain, which has access to the resource with the rights to change / write.
Alternatively, roll your own MSBuild copy task, which performs impersonation based on a few additional parameters.
Check out the MSDN docs for creating an MSBuild task , you can inherit from Task, and then implement the method Execute().
source
share