Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 295027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:25:15+00:00 2026-05-12T06:25:15+00:00

I am looking for a way to find out if a user has the

  • 0

I am looking for a way to find out if a user has the “Start a Build” permission for a given project.

As of now, I know that the VersionControlServer object can be used to return a string array of the user’s effective permissions within a project. But, when I run the GetEffectivePermissions method on the VersionControlServer, the “Start a Build” and “Administer a Build” permissions are not included in the array that lists the user’s permissions.

I am assuming (incorrectly?) that this is because I am querying a VersionControlServer, which does not control build permissions.

How would I find the user’s effective “build-related” permissions via the TFS 2008 API?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:25:15+00:00Added an answer on May 12, 2026 at 6:25 am

    Unfortunately, Team Build does not have a full-blown client object model like Version Control. It’s MUCH better in 2008, but it still lacks its own security API. So you have to step down a level to the more basic webservice interfaces offered server-wide:

    • IAuthorization
    • ICommonStructure
    • IGroupSecurity

    Here’s a quick demo in Powershell:

    # add me to the Build Services security group
    $tfs = Get-TfsServer njtfs -all
    $user = $tfs.gss.ReadIdentityFromSource($tfs.GSS_SearchFactor::AccountName, "rberg")
    $uri = $tfs.css.GetProjectFromName("Test-ConchangoV2").uri
    $role = $tfs.gss.ListApplicationGroups($uri) | ? { $_.displayname -match "Build" }
    $tfs.gss.AddMemberToApplicationGroup($role.Sid, $user.Sid)
    
    # explicitly give me the Administer Builders permission
    $ace = new-object $tfs.GSS_AccessControlEntry ADMINISTER_BUILD, $user.Sid, $false
    $objectId = [Microsoft.TeamFoundation.PermissionNamespaces]::Project + $Uri
    $tfs.AUTH.AddAccessControlEntry($objectId, $ace)
    
    # print build-related ACLs
    $tfs.AUTH.ReadAccessControlList($objectId) | 
        ? { $_.actionId -like "*build" } | 
        ft -auto ActionId, Deny, @{
            Label = "Name"; 
            Expression = { $tfs.gss.ReadIdentity($tfs.GSS_SearchFactor::Sid, $_.Sid, $tfs.GSS_QueryMembership::none).DisplayName }
        }
    

    Unfortunately, with this low level API there is no one-stop shopping for “effective permissions.” The Auth service can resolve various ACEs that apply to a user via multiple group membership, as well as a limited form of parent->child inheritance, but I don’t think it knows about the version control hierarchy — only the “common structure” (aka Team Projects -> areas & iterations) hierarchy. Luckily, build permissions are only 1 level deep (always stored @ the Team Project root) so this shouldn’t be an issue in your case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we are looking for a way to find out (not modify, just find out)
I am looking for a way to find a Guid within a string that
I'm looking for a way to find/replace links to images (within user-generated content) without
Trouble! I'm looking for a way to find the countries within a given range
What I want : To know when the user has pressed the button that
I'm trying to find an elegant way to inform a user that s/he is
Basically, I'm looking to find out a way to create a pop up window
Is there a way to find out what associations a model has? Take these
Recently I've been looking to create some way of showing a user that something
I'm looking for a way to find out which browsers are installed on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.