Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuthWebSample does not leverage .NET client library with VssConnection #44

Open
achimismaili opened this issue Aug 29, 2019 · 0 comments

Comments

@achimismaili
Copy link

I think, it is a big disadvantage to not have the .NET Client Library Microsoft.TeamFoundationServer.Client included in the OAuthWebSample. That makes things soo much more simple.

The following is the only missing code, once the access token is retrieved. Please update the sample.

VssOAuthAccessTokenCredential credentials = new VssOAuthAccessTokenCredential(AccessToken);
VssConnection connection = new VssConnection(new Uri("https://dev.azure.com/[your org]"), credentials);
var client = connection.GetClient<ProjectHttpClient>();
var projects = client.GetProjects().Result;

Of course, you also need to add the nuget package Microsoft.TeamFoundationServer.Client to your web project first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant