TFS 2013 get All TFS group including Windows group

后端 未结 1 1870
死守一世寂寞
死守一世寂寞 2021-01-26 05:34

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:

1条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-26 06:05

    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();
    Identity i = gss.ReadIdentity(SearchFactor.AccountName, "myalias", QueryMembership.Direct);
    

    That's a user, you can try getting groups through it as well.

    0 讨论(0)
提交回复
热议问题