I have already created the TFS Build Agent pool windows service that is running periodically and tries to connect to TFS,
It seems it tries to run with its own credentials and the windows service is installed on a Server that is not in the same domain as TFS (but I can access the TFS from this sever), so It fails with the below error
Error in the service log file:
Microsoft.VisualStudio.Services.Common.VssUnauthorizedException: VS30063: You are not authorized to access https://tfsURL.
How to impersonate or making the agent Pool Windows service connected as "NT AUTHORITY\Network" or with another credentials from server in a domain to the TFS which in another domain