# Assigning ACS Users to Access Groups

Some ACSs use access groups, which are sets of ACS users, combined with sets of permissions. These permissions include both the set of areas or assets that the ACS users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each ACS user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of ACS users, especially in bigger organizations or complexes.

{% hint style="info" %}
To learn whether your ACS supports access groups, see the [system integration guide](https://docs.seam.co/latest/device-and-system-integration-guides#access-control-systems) for your ACS.
{% endhint %}

This guide explains how to grant access permissions to ACS users by adding them to the appropriate access groups.

***

## Add an ACS User to an Access Group

To [add an ACS user to an access group](https://docs.seam.co/latest/api/acs/users/add_to_access_group), provide both the `acs_user_id` and the `acs_access_group_id`.

{% tabs %}
{% tab title="JavaScript" %}
**Request:**

```javascript
await seam.acs.users.addToAccessGroup({
  acs_user_id: "33333333-3333-3333-3333-333333333333",
  acs_access_group_id: "44444444-4444-4444-4444-444444444444"
});
```

**Response:**

```json
void
```

{% endtab %}

{% tab title="cURL" %}
**Request:**

```bash
curl -X 'POST' \
  'https://connect.getseam.com/acs/users/add_to_access_group' \
  -H "Authorization: Bearer ${SEAM_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
  "acs_user_id": "33333333-3333-3333-3333-333333333333",
  "acs_access_group_id": "44444444-4444-4444-4444-444444444444"
}'
```

**Response:**

```json
{
  "ok": true
}
```

{% endtab %}

{% tab title="Python" %}
**Request:**

```python
seam.acs.users.add_to_access_group(
  acs_user_id="33333333-3333-3333-3333-333333333333",
  acs_access_group_id="44444444-4444-4444-4444-444444444444"
)
```

**Response:**

```
None
```

{% endtab %}

{% tab title="Ruby" %}
**Request:**

```ruby
# Coming soon!
```

**Response:**

```
# Coming soon!
```

{% endtab %}

{% tab title="PHP" %}
**Request:**

```php
$seam->acs->users->add_to_access_group(
  acs_user_id: "33333333-3333-3333-3333-333333333333",
  acs_access_group_id: "44444444-4444-4444-4444-444444444444"
);
```

**Response:**

```
void
```

{% endtab %}

{% tab title="C#" %}
**Request:**

```csharp
seam.UsersAcs.AddToAccessGroup(
  acsUserId: "33333333-3333-3333-3333-333333333333",
  acsAccessGroupId: "44444444-4444-4444-4444-444444444444"
);
```

**Response:**

```
void
```

{% endtab %}
{% endtabs %}

***

## Remove an ACS User from an Access Group

To [remove an ACS user from an access group](https://docs.seam.co/latest/api/acs/users/remove_from_access_group), provide both the `acs_user_id` and the `acs_access_group_id`.

{% tabs %}
{% tab title="JavaScript" %}
**Request:**

```javascript
await seam.acs.users.removeFromAccessGroup({
  acs_user_id: "33333333-3333-3333-3333-333333333333",
  acs_access_group_id: "44444444-4444-4444-4444-444444444444"
});
```

**Response:**

```json
void
```

{% endtab %}

{% tab title="cURL" %}
**Request:**

```bash
curl -X 'POST' \
  'https://connect.getseam.com/acs/users/remove_from_access_group' \
  -H 'accept: */*' \
  -H "Authorization: Bearer ${SEAM_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
  "acs_user_id": "33333333-3333-3333-3333-333333333333",
  "acs_access_group_id": "44444444-4444-4444-4444-444444444444"
}'
```

**Response:**

```json
{
  "ok": true
}
```

{% endtab %}

{% tab title="Python" %}
**Request:**

```python
seam.acs.users.remove_from_access_group(
  acs_user_id="33333333-3333-3333-3333-333333333333",
  acs_access_group_id="44444444-4444-4444-4444-444444444444"
)
```

**Response:**

```
None
```

{% endtab %}

{% tab title="Ruby" %}
**Request:**

```ruby
# Coming soon!
```

**Response:**

```
# Coming soon!
```

{% endtab %}

{% tab title="PHP" %}
**Request:**

```php
$seam->acs->users->remove_from_access_group(
  acs_user_id: "33333333-3333-3333-3333-333333333333",
  acs_access_group_id: "44444444-4444-4444-4444-444444444444"
);
```

**Response:**

```
void
```

{% endtab %}

{% tab title="C#" %}
**Request:**

```csharp
seam.UsersAcs.RemoveFromAccessGroup(
  acsUserId: "33333333-3333-3333-3333-333333333333",
  acsAccessGroupId: "44444444-4444-4444-4444-444444444444"
);
```

**Response:**

```
void
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seam.co/latest/capability-guides/access-systems/user-management/assigning-users-to-access-groups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
