Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Guest
2020-09-03T15:52:07Z
We are trying to create an automated report to display which users are in which usergroups.

Is there a way to see which users are in which usergroup via the API?

There are API endpoints for listing all users and listing all usergroups but is there a way to tie them together?

Thanks
Sponsor
Forum information
Support
2020-09-08T14:10:21Z
Here is an example that lists all groups that users belong to. Hope this will be more clear:

                 foreach (SecUserClass user in s.Permissions.GetAllUsers())
                    {
                        foreach (string groupId in user.Groups)
                        {
                            SecGroupClass group = s.Permissions.GetGroup(groupId);
                            Trace.WriteLine(group.Name);
                        }
                    }

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top