如何使用 TFS API 获取 TFS 用户组和特定组中的用户?
问题描述:
我想在 DropDown 中列出 TFS 用户组,并且根据用户组的选择,我需要使用 TFS API 填充该特定组中的用户.
I want to list TFS user groups in a DropDown and based on selection of user group I need to populate users in that particular group using TFS API.
答
最后一个例子可能是最相关的.
The last example is probably the most relevant.
IGroupSecurityService gss = (IGroupSecurityService)server.GetService(typeof(IGroupSecurityService));
Identity[] UserId = gss.ReadIdentities(SearchFactor.Sid, SIDS.Members, QueryMembership.None);