我想以編程方式將用戶添加到團隊項目。我發現解決方案是這樣的:如何以編程方式向TFS添加用戶
IGroupSecurityService gss = (IGroupSecurityService)objTFS.GetService(typeof(IGroupSecurityService));
Identity identity = gss.ReadIdentity(SearchFactor.AccountName, "Group name", QueryMembership.None);
gss.AddMemberToApplicationGroup(groupProject.Sid, member.Sid);
但是,這隻適用於TFS已知的組/用戶。
我想在Windows帳戶添加到TFS
例如:
Windows帳戶名:TestTFS
密碼:123456
然後TestTFS添加到TFS編程。
我知道有一個名爲TeamFoundation Administration Tool的工具可以做到這一點,但我不想使用它。
檢查了這一點http://stackoverflow.com/questions/7961727/how-to-grant-read-only-access-to- all-tfs-team-projects-to-a-of-users/7971731#7971731 –