簡體   English   中英

以編程方式將組和用戶從Active Directory添加到TFS

[英]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);

其他有用的帖子供您參考:

https://social.msdn.microsoft.com/Forums/vstudio/zh-CN/ed719386-925b-49a3-a7d7-5c2a147c7da2/add-ad-group-to-tfs-group-programmatically?forum=tfsadmin

如何以編程方式將用戶添加到TFS

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM