1

I have TfsConfigurationServer configurationServer setup with TFS common url (i.e. "http://mytfs/tfs/"). This instance is authenticated with given credentials.

I have two collections (actually more, than two, but only these two are interesting for me) - Collection1 and Collection2.

And Collection1 has user group under project '[Project1]\Group1'. And Collection2 has user group under project '[Project2]\Group2'.

I want to list all users inside both this groups. Is this somehow possible using mine already created and authenticated configurationServer? I don't want to use each collection URIs and auth again.

configurationServer = new TfsConfigurationServer(new Uri("http://mytfs/tfs/"), new NetworkCredential(UserName, UserPassword, Domain));

This one answer is working for me. But it need to be calculated for each collection. And takes too long. So maybe there is more faster way? Maybe it is possible somehow by query?

Community
  • 1
  • 1
Ksice
  • 3,277
  • 9
  • 43
  • 67
  • 1
    try this http://stackoverflow.com/questions/1097713/how-to-get-tfs-user-groups-and-users-in-particular-group-using-tfs-api or that http://blogs.microsoft.co.il/shair/2009/01/14/tfs-api-part-4-get-tfs-user-list-mail-sid-account-domain/ – Claudius Mar 22 '16 at 15:40

1 Answers1

0

Unfortunately, there is no way to calculate across Collections. You have to calculate for each collection, as each Collection has separate database and different permission. You need to treat them separately.

Besides TFS API, here is a script solution you can take a look, just in case you are interested: https://blogs.msdn.microsoft.com/alming/2013/03/07/using-powershell-and-tfs-api-to-list-users-in-tfs-2010-and-2012/

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39