We've run into a little problem with some of our team builds, where a project can have its own active directory. When we deploy a projekt from a team build, we run into user permission problems, since authorization is relative to the AD - e.g. the user group 'Everyone' on a folder, is relative to the AD. I've tried to add the build user directly to the projects AD, but I get an error specifying that no logon server is available. Just added a local user to the server doesn't work either.
I cannot create a trust between the custom AD's and the produktion AD. I've noted the powershell to accomplish this, but am hoping for a more elegant way. I've tried using Michael Roufa's wrapper for Community Tasks, but I cannot make it work, for some reason.
So... my question is whether it is possible to impersonate a user in msbuild in an elegant way, when invoking other tasks?
Software: TFS2010, MSBuild 4.0, Various tasks lib + custom, Windows 2008 R2 servers