![](/img/trans.png)
[英]Adding and removing users from Active Directory groups in .NET
[英]Add groups and users from Active directory to TFS programatically
我們可以以編程方式將用戶和組添加到TFS,並使用團隊項目的管理上下文在TFS中添加AD用戶/組。 但是,我可以通過編程方式將用戶組從Active Directory添加到TFS集合嗎? 我正在處理以下情況:在AD上與用戶一起創建新組后,以編程方式將其包括在TFS集合中。
如果可能,我對.NET C#解決方案感興趣。
檢查這篇文章中的答案:
您可以使用代碼片段將Windows用戶添加到TFS。
”
var collection = new TfsTeamProjectCollection(new Uri("http://mytfs:8080/tfs/MyCollection"));
var identityService = collection.GetService<IIdentityManagementService>();
var readIdentity = identityService.ReadIdentity(IdentitySearchFactory.AccountName, @"[domailName here]\" + userName, MembershipQuery.Direct, ReadIdentityOptions.None);
”
其他有用的帖子供您參考:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.