TFS User needs permission to update build informat

2019-09-18 02:04发布

问题:

Like I already asked in Visual Studio Forum, I wrote an application that binds work items to builds based on svn logs. When I try to hit buildDetail.Information.Save(); I get the Exception User (Bob) needs permission to update build information.

This user got the right permission set in the build permission dialog and I also set it in the admin command line on the tfs itself

C:\Program Files\Microsoft Team Foundation Server 14.0\Tools\tfssecurity /a+ Build ProjectName UpdateBuildInformation n:ourDomain\bob ALLOW /collection:http://tfs-test:8080/tfs/Test

ToyStory is the name of the test project.

Last but not least: Bob is a Service Account.

What am I still missing that I get these messages? The VsoAgent.exe is running as Service on our BuildMashine as Bob and sure I restartet everything a couple of times. We are on all last updates for TFS 2015U1 and Windows Server 2008 R2. All Enterprise licenses. Date today: 22.03.2016

Update: Now I'm on the new R2 for TFS and I have still no clue why this is not working. Also there is still no proper REST function to set bound work items to that build

回答1:

Check the groups that Bob belongs to, to see whether there is a Deny or Not Set permission for the groups.



回答2:

It seems that you are trying to update a vNext build which is not fully supported by TFS API. The TFS API is designed to use with XAML build. So if you use it with vNext build, you may see some unexpected issues.

To attach a workitem to a build, you need to do update the information from workitem. Add a build link to the workitem and specify the build number. After this, you will see the associated work items in the build summary. You could use this API: Add a link.