microsoft / microsoft/azure-devops-auth-samples
OAuthWebSample does not leverage .NET client library with VssConnection
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 277
- Forks
- 307
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the OAuthWebSample web project at the point where the access token is retrieved, and review how the sample currently uses that token. Add the Microsoft.TeamFoundationServer.Client package and demonstrate the VssOAuthAccessTokenCredential, VssConnection, and ProjectHttpClient flow shown in the issue. Done means the sample builds and uses the .NET client library after OAuth authentication.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- api, authentication
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100