cancel
Showing results for 
Search instead for 
Did you mean: 

User group list by API code

Vimalathithun_B
Champ in-the-making
Champ in-the-making

How to retrieve the User group list by API code

1 ACCEPTED ANSWER

Ariel_Koiman
Star Contributor
Star Contributor

This will retrieve a list of user groups, provided that the API user has rights to administer those groups:

UserGroupList userGroups = app.Core.UserAdministration.GetUserGroups();

Note that this won't retrieve the expected result set if this code were to run under a regular user with no User Admin rights.

Best,
Ariel

View answer in original post

1 REPLY 1

Ariel_Koiman
Star Contributor
Star Contributor

This will retrieve a list of user groups, provided that the API user has rights to administer those groups:

UserGroupList userGroups = app.Core.UserAdministration.GetUserGroups();

Note that this won't retrieve the expected result set if this code were to run under a regular user with no User Admin rights.

Best,
Ariel