Quantcast
Channel: Team Foundation Server - General forum
Viewing all articles
Browse latest Browse all 6687

Fetch project collection details using OAuth authorizations

$
0
0

Hi,

Currently i am using service account to fetch Tfs Team Project Collection details.

but now i want to do it through OAuth authorizations . I tried it using VssConnection,

but VssConnection is using different liabrary so i am not able to initialize TfsTeamProjectCollection class.

Though i am able to read the project collection using VssConnection  but it is not returning all the required field which TfsTeamProjectCollection  is returning.

Below is the code which we are using for OAuth.

  VssConnection connection1 = new VssConnection(new Uri(tfsurlNew), new VssOAuthCredential(accessToken));

 WorkItemTrackingHttpClient witClient = connection.GetClient<WorkItemTrackingHttpClient>();
List<QueryHierarchyItem> items = witClient.GetQueriesAsync(projectName).Result;

Please suggest what are the possible ways to do it.

Thanks

jitendra 


Viewing all articles
Browse latest Browse all 6687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>