title: TFS API to create a TFS Group and set permissions?
body: <p>Hello I'm trying to use TFS API to create a new group, for it I have this code:</p>
  
  <pre><code>var teamProjects = this.VersionControlServer.GetAllTeamProjects(false);
  foreach (var teamProject in teamProjects)
  {
       var result = _gss.CreateApplicationGroup(teamProject.ArtifactUri.AbsoluteUri, "NewGroup","TestDescription");
  
       //NOW I WANT TO SET THE PERMISSIONS FOR THIS GROUP
  }
  </code></pre>
  
  <p>As I need to set the permission "Edit project-level information" for this group I tried lot of methods and different approaches, but anything seems to solve my need. This for example:</p>
  
  <pre><code>var ProjectSecurityToken = AuthorizationSecurityConstants.ProjectSecurityPrefix + teamProject.ArtifactUri.AbsoluteUri;
  var groupACL = securityNamespace.QueryAccessControlList(ProjectSecurityToken, new[] {list[4].Descriptor}, false);
  
  securityNamespace.SetAccessControlEntry(ProjectSecurityToken, new Microsoft.TeamFoundation.Framework.Client.AccessControlEntry(list[4].Descriptor, 115, 0), true);
  </code></pre>
  
  <p>I had hard-coded "list[4]" because it was the group I just created, I need some help to see what is wrong in my code. I get no error message and it doesn't work as well. </p>