Answer: If you are already authenticated against the “classic” TFS Object Model from the Microsoft.TeamFoundationServer.ExtendedClient NuGet Package (typically having an instance of TfsTeamProjectCollection), you can use its GetClient<T> generic method to aquire an *HttpClient class from the REST API.
Example:
TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(new Uri(collectionUri)))
TfvcHttpClient tfvcClient = tpc.GetClient<TfvcHttpClient>();
See also “Example 3” at: https://www.visualstudio.com/en-us/integrate/get-started/client-libraries/samples
–Neno
No Comments so far ↓
There are no comments yet...Kick things off by filling out the form below.