I am working on this TFS 2013 to get the project level permission of all the TFS group. But I cannot get the windows group. I use the following code to list the groups:
Windows groups are not stored in TFS, but in Active Directory. To query Active Directory through TFS, use:
var collection = new TfsTeamProjectCollection(new Uri("http://mytfs:8080/tfs/MyCollection"));
var gss = collection.GetService<IGroupSecurityService>();
Identity i = gss.ReadIdentity(SearchFactor.AccountName, "myalias", QueryMembership.Direct);
That's a user, you can try getting groups through it as well.