Questions tagged [tfs-sdk]

This tag is used to identify questions about the use of the Azure DevOps / TFS API, in any supported language, and any tools that support or build upon it. There are different APIs available. The REST API is the newer API. The older set of APIs consists of the Client Object Model, the Server Object Model and the Build Process Object Model. For .NET there are the .NET client libraries implementing clients for all these APIs.

This tag is used to identify questions about the use of the Azure DevOps / TFS API, in any supported language, and any tools that support or build upon it.

There are different APIs available. The REST API (https://learn.microsoft.com/en-us/rest/api/azure/devops) is the newer API. The older set of APIs consists of the Client Object Model, the Server Object Model and the Build Process Object Model (https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2013/bb130146%28v%3dvs.120%29).

For .NET there are the .NET client libraries implementing clients for all these APIs (see https://learn.microsoft.com/en-us/azure/devops/integrate/concepts/dotnet-client-libraries).

569 questions
3
votes
0 answers

Impersonation in DevOps

I am using TFS/DevOps .Net client library (soap based) to interact with DevOps. However I am having problems to impersonate as another user, and DevOps always return me an error: UserX needs the following permission(s) to perform this action: Make …
DavidBL
  • 121
  • 1
  • 6
3
votes
1 answer

How to get a web URL for a PullRequest using TFS client libraries?

Is there a way to get web URL(TeamWebAccess like https://tfshost/tfs/Collection/Project/_git/Repository/pullrequest/12345 for PR#12345, not the API url) for a PullRequest using TFS client libraries? var prId = 12345; var tpc = new…
Eugene Podskal
  • 10,270
  • 5
  • 31
  • 53
3
votes
1 answer

How to Login to VSTS programmatically

I have an automatic branching utility that does various operations. We have upgraded to VSTS and I am having trouble using the Tfs calls with the new server: //login NetworkCredential netCred = new NetworkCredential("emailAddress",…
user1254382
  • 33
  • 1
  • 4
3
votes
2 answers

TF30063: You are not authorized ... programmatic access not working

The code below provided in this answer did work well for a while but now its throwing Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: 'TF30063: You are not authorized to access https://{mysite}.visualstudio.com/.' again. var…
participant
  • 2,923
  • 2
  • 23
  • 40
3
votes
1 answer

Loading symbols for remote debugging

I am trying to debug a plug-in for TFS 2010 using the code found here. That example recommends using TFS installed locally to debug. I wanted to try it with a dev TFS 2010 Server I have setup. So I installed Remote Debugger x64 on that machine…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
3
votes
1 answer

Complete TFS Pull Request programmatically

Using the Microsoft.TeamFoundationServer.Client (15.112.1) to connect to a TFS 2017 Update 2 server we can get details about an existing PR like this: var connection = new VssConnection(collectionUri, credentials); var client =…
Miguel
  • 3,786
  • 2
  • 19
  • 32
3
votes
1 answer

Permission error when trying to programatically connect to TFS 2010

I'm trying to connect to TFS 2010 through the .Net Microsoft.TeamFoundation.Client.TeamFoundationServer class (in this case through powershell). I pass in for constructor arguments the same url that I connect to through visual studio, and my Active…
George Mauer
  • 117,483
  • 131
  • 382
  • 612
3
votes
3 answers

API resource location is not registered

i am able to create project/delete/rename everything but when it come for getting group its says "API resource location ebbe6af8-0b91-4c13-8cf1-777c14858188 is not registered on http://khanamar3:8080/tfs/DefaultCollection/" please help..... public…
amar khan
  • 29
  • 1
  • 4
3
votes
1 answer

Can I get a list of services registered to TfsTeamProjectCollection

I am using PowerShell to connect to TFS and perform various operation. I can do this: $Uri = New-Object System.Uri("http://mycompany.com/tfs/collection") $t = New-Object Microsoft.TeamFoundation.Client.TfsTeamProjectCollection($Uri,…
Kevin Sedota
  • 141
  • 1
  • 10
3
votes
1 answer

Using TFS2010 client in a 64-bit only IIS process

I'm finding conflicting information regarding the TFS 2010 Client assemblies. I wish to connect to a TFS 2010 server from an ASP.Net application running on IIS 7.5 in a 64-bit only application pool. I x-copied all the TFS client assemblies into the…
Bittercoder
  • 11,753
  • 10
  • 58
  • 76
3
votes
1 answer

Get TFS work item and its links using REST API

I'm using TFS REST API and am trying to retrieve work items & their child items by title (parent's title is the parameter). I can't find a way to retrieve these linked items using TFS REST API. This is what I've tried. First I query for the work…
YuriW
  • 869
  • 1
  • 11
  • 22
3
votes
1 answer

Create pull request from specific commit via VS team services

I am trying to create a pull request from specific commit. Is it possible? Detail: There is commit c1, c2, c3 in branch b1, and commit c3 is also in branch b2. Create a pull request to merge commit c2 into branch b2. My failed attempts: Create a…
mosyu
  • 57
  • 1
  • 8
3
votes
4 answers

Microsoft.TeamFoundation.VersionControl.Client location?

I've got this nuget package (and the non-extended one): https://www.nuget.org/packages/Microsoft.TeamFoundationServer.ExtendedClient/ Which I'm seeing references to as a replacement for Microsoft.TeamFoundation.VersionControl.Client.dll. …
user1874135
  • 419
  • 5
  • 17
3
votes
1 answer

How to find out the source branch of a merge changeset?

The QueryHistory(destination) function returns a collection of changesets. Some of these changesets contain merge actions. Which function or property could identify the source branch to show where the merged code comes from?
Hardy
  • 31
  • 1
3
votes
1 answer

TFS2015 REST API Build definition update

I'm trying to update a build definition through REST API with PowerShell. The script used is: $url = "http://tfs:8080/tfs/collection/project/_apis/build/definitions/$($buildId)?api-version=2.0" $obj = Invoke-RestMethod -Uri $url2 -Method Get…
ds19
  • 3,176
  • 15
  • 33