Hi guys,
I am currently tasked to build a windows application to get all the groups including the Windows groups through TFS. But so far I can only get the TFS groups but not the Windows groups. I want to get all of it.
I use the code below to get the tfs groups but could not get the windows groups:
var collection = new TfsTeamProjectCollection(new Uri("tfs collection link here");
var identityService = collection.GetService<IIdentityManagementService>();
var listApplicationGroups = identityService.ListApplicationGroups(project.Uri.AbsoluteUri, ReadIdentityOpetionsNone);
I can get the user's memberOf which includes the windows group but what I need is the other way around wherein I want to get all the Windows groups then see who are under those windows group and show the permission of the windows group.
I have done the code below but this is only if you have a specific user then you can get the group that the user is a member of.
var collection = new TfsTeamProjectCollection(new Uri("tfs collection link here");
var identityService = collection.GetService<IIdentityManagementService>();
var readIdentity = identityService.ReadIdentity(IdentitySearchFactory.AccountName, userDomainName, MembershipQuery.Direct, ReadIdentityOptions.None);
Is it possible to do that in TFS to get the windows group? Can you show me any code snippet?
wynn