I am connecting to TFS using the following code, Can someone guide me on which API I should so that I dont have to provide user name , domain and pass.
Application should pick the windows credential through which I have logged in to the system.
TeamFoundationServer tfServer = new TeamFoundationServer(@”domain”, new NetworkCredential(“username”, “,”password”, “domain”));
tfServer.Authenticate();
Try using System.Net.CredentialCache.DefaultNetworkCredentials? Assuming you are on the same domain.