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


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | addUserToGroup(user, group) | **Package** |  |
| **Alias** | addUserToGroup | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Adds a single user to a group if the user is not already in that group.

Adds a single user to a group if the user is not already in that group.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| User | String | Yes | Username or userkey. |
| Group | String | Yes | Group name. |

## Return Type

**Boolean**

Returns "true" if operation succeeded.

## Example

```
addUserToGroup("user.3", "Senior Developers");
```

> ⚠️ The look-up is first made after the userkey, then after the username.

## See also

> Macro (contentbylabel)