---
title: "usersInGroups"
canonical: "https://support.appfire.com/space/PSCONF/15304575/usersInGroups"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | usersInGroups(groups) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Returns a list of users common to all the specified groups.

Returns a list of users common to all the specified groups.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | groups | String [] | Yes | Array containing the group names to retrieve the common users from. |

## Return Type

**String []**

## Example

Returns all users which are members of both "confluence-users" and "confluence-administrators" groups.

```javascript
string[] users = usersInGroups({"confluence-users", "confluence-administrators"});
```

## See also

> Macro (contentbylabel)