> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# usergroup

> List provider for the UserGroup table. While this table looks like an MDO table, it lacks the standardized grouplink and headinglink companion tables (for good reason, since it is the group table itself).

## "usergroup" MDO List

List provider for the UserGroup table. While this table looks like an MDO table,
it lacks the standardized grouplink and headinglink companion tables (for good reason,
since it is the group table itself).

Implemented by the <see cref="T:SuperOffice.CRM.Lists.UserGroupProvider">UserGroupProvider</see> class.
The name of the MDO list is 'usergroup'.

## Additional Attributes

| Description                                        | Name                   | Example Value |
| -------------------------------------------------- | ---------------------- | ------------- |
| Exclude the given user-group id                    | exclude\_id            | 1234          |
| Exclude the given comma-separated user-group id    | exclude\_ids           | 12,34,69      |
| Add a blank item                                   | addblankstring         | True          |
| Add a root target item                             | addRootTarget          | False         |
| Use a search that works with multilanguage strings | useMultilanguageSearch | False         |

## Sample Request

```http! theme={null}
GET /api/v1/MDOList/usergroup
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: *

```

## Sample Code

```cs theme={null}
var listProvider = ClassFactory.CreateRequired<SuperOffice.CRM.Lists.ISoListProviderFactory>().Create("usergroup", forceFlatList: true);
foreach (var item in listProvider.RootItems) {
    Console.WriteLine("{0} {1} {2} {3}", 
         item.Id, ResourceManager.ParseInlineResources(item.Name), item.StyleHint, item.ExtraInfo);
}
```

## Sample Output

| Id | Name           | StyleHint | ExtraInfo |
| -- | -------------- | --------- | --------- |
| 2  | Salg           |           |           |
| 4  | Tjenester      |           |           |
| 3  | Service        |           |           |
| 5  | Markedsføring  |           |           |
| 1  | Administrasjon |           |           |
| 6  | Testgruppe1    |           |           |
| 7  | Testgruppe2    |           |           |

## Related MDO Lists

* "usergroupheadings"
* "usergroupheadingswithallitem"
* "usergroupheadingswithallitemwithnoselection"
* "usergroupheadingswithnoselection"
* "usergroupwithallitem"
* "usergroupwithallitemwithnoselection"
* "usergroupwithnoselection"


## Related topics

- [UserGroup table](/en/database/tables/usergroup.md)
- [SuperOffice.WebApi.Data.UserGroup](/en/api/reference/webapi/SuperOffice.WebApi.Data.UserGroup.md)
- [usergroupwithhistoryall](/en/api/mdo-providers/reference/usergroupwithhistoryall.md)
- [UserGroupLink table](/en/database/tables/usergrouplink.md)
- [SuperOffice.WebApi.Data.WorkflowStepDistributeToOwner](/en/api/reference/webapi/SuperOffice.WebApi.Data.WorkflowStepDistributeToOwner.md)
- [SuperOffice.WebApi.Data.User](/en/api/reference/webapi/SuperOffice.WebApi.Data.User.md)
