Seth,
If you can use the .NET libraries via C#, this static method can gather a list of groups and users for an Organization instance:
======================
public static string GetGroupsUsersList(Organization org)
{
if (org == null) { return "(No Organization connected...)"; }
StringBuilder list = new StringBuilder();
list.AppendLine("Organization: " + org.Name.ToUpper().Trim());
list.AppendLine();
var groups = org.GetGroupsFromGroupsRelation().Item;
groups = groups.OrderBy(g => g.Name).ToList();
foreach (Group group in groups)
{
list.AppendLine(group.Name.ToUpper().Trim() + " Users:");
list.AppendLine(VFP.REPLICATE('=', group.Name.Length + 7));
var users = group.GetUsersFromUsersRelation().User;
users = users.OrderBy(u => u.Name).ToList();
foreach (User user in users)
{
list.AppendLine(user.Name.Trim() + " (" + ((user.FirstName != null ? user.FirstName : "") + " " + (user.LastName != null ? user.LastName : "")).Trim() + ")");
}
list.AppendLine();
}
return list.ToString();
}
======================
You can ignore the VFP.REPLICATE stuff -- that is a library I made to perform certain VFP functions by a name I was used to. You can format the textual output however you want, or store user information in a different data structure, such as List<User>.
If you need to do this via a non-.NET web request, I have not done that. But there should be a resource for it that returns users as XML or JSON
Finally, if you are on-premise, hitting the SQL Server data directly is your best bet for getting a complete look at groups, users, and permissions. The Platform SDK does not have a lot of deeper information with regard to permissions, but the SQL Server data can be pieced together (though that is probably all broken if I ever went to DW 7.0 since they changed the data model a lot). I have an example of a simple user listing with some security information if you want to see what those queries look like and what tables they hit.
Hope this helps!
Thanks,
Joe Kaufman