# List Groups

> `UiPath.MicrosoftOffice365.Activities.ListGroups`

`UiPath.MicrosoftOffice365.Activities.ListGroups`

## **Description**

Uses the Microsoft Graph [List groups](https://docs.microsoft.com/en-us/graph/api/group-list?view=graph-rest-1.0&tabs=http) API to list all user groups.

### Scopes

This activity requires the following scopes:

* Group.Read.All

OR

* Directory.Read.All

OR

* Group.ReadWrite.All

OR

* Directory.ReadWrite.All

## Project compatibility

Windows - Legacy | Windows

## Configuration

**Properties**

#### Common

* **DisplayName** - The display name of the activity. This property supports `String` variables and string formatted values.

#### Input

* **Group Type** - The type of the groups - universal or dynamic membership. The latter may contain membership rules that automatically add or remove members from the group based on user properties. The options are **Unified** and **DynamicMembership**.

#### Misc

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports Boolean values.

#### Output

* **Groups** - The list of all groups in an organization, included but not Iimited to Office 365 Groups. This field supports only `Group[]` variables. Required if you plan to use the output data in subsequent activities. You can also use this variable as an input variable in other Group and Planner activities. Use `Groups(x)` to retrieve the xth group from the array.
