---
title: "groupsInRole"
canonical: "https://support.appfire.com/space/PSJ/15484917/groupsInRole"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | groupsInRole(project, role) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Returns the groups that correspond to a certain role on the specified project.

Returns the groups that correspond to a certain role on the specified project.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| project | String | Yes | Key of the selected project. |
| role | String | Yes | Name of the role that is verified. |

## Return Type

**String []**

Returns a list with the groups who are associated with the given role on the specified project.

## Example

```
string projectKey = "TEST";
string role = "Administrators";
string&nbsp;[] groups = groupsInRole(projectKey, role);
for (string g in groups) {
    runnerLog("Returned group: "+ g);
}
```

## See also

> Macro (contentbylabel)