i would like to get the valid users in my team server (with a particular project) and i will put it in a lets say, dropdown list. so that i can use it in adding workitems with the use of ASP.Net
i used the IGroupSecurityService but i can get only the Group Names and not the members inside the group.
any ideas Thanks,.
(btw, im using ASP.Net-C#)

How to get the list of valid users in a particular project?
Fernando Ronci
Based on the Code Snippet of Robert Horvick I have build an example (C# Console Application)
DavidJW
hi, this is what james manning did..
but mine is different because it depends on the project and you can figure it out once you understood how it works.
TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(servername/ip);
IGroupSecurityService gss = (IGroupSecurityService)tfs.GetService(typeof(IGroupSecurityService));
Identity idSID = gss.ReadIdentity(SearchFactor.AccountName, "Team Foundation Valid Users", QueryMembership.Expanded);
Identity[] idUserName = gss.ReadIdentities(SearchFactor.Sid, idSID.Members, QueryMembership.None);
foreach (Identity id in idUserName)
{
if (lstUsers.Contains(lstUsers.FindByText(id.DisplayName)) == false)
{
lstUsers.Add(id.DisplayName);
}
}
Okan Oksak
Web access for adding/editing Work Items can be done with the Team Foundation Server API.
Any Work Item belongs to a project. Each project has its security settings for Work Items.
If you have the Team Explorer installed you can see the settings by selecting Team - Team Project Settings - Areas and Iterations and click on the 'Security ...' button. You'll discover that (by default) a project has 4 groups: Build Services, Contributors, Project Administrators and Readers. Only the first three groups can add/edit Work Items ('Edit work items in this node').
To retrieve the list of Valid Users (Members of the groups Build Services, Contributors and Project Administrators) you'll have to use a TFS Web Service. Microsoft provides the Team Foundation Server API to make things easier.
Based on the Code Snippet of Robert Horvick I have build an example (C# Console Application):
MHerlund
i still cant get it...
i dont want to use my alternative way of doing it.. (getting the username and then validate it). i want it to be in a list...
anyone tried and made this, that can help
Thanks.
nolte
its ok now.. i figured it out my self..(after tons of trials).. hehe
and also i found out why there is no answer for this....
Thanks.....
Moumen ITDev
Can you share what you did to get the list of Valid users in a particular project, I am trying to do the same and would appreciated if you posted your code snippet.
THanks.