# Configuring Group-Based Notifications

This guide will help you configure the Groups feature to route login requests from specific machines to designated MS Teams channels. This is particularly useful for organizations with multiple Business Units or Lines of Business (LOBs) that require requests to be sent to different supervisory teams.

## Step 1: Provisioning Groups

### 1. Contact Support:

* Begin by contacting our support team to provision the necessary groups for your organization.
* You will receive a list of **Group IDs** and their corresponding **Subscription Keys** after the groups are provisioned.

### 2. Receive Group Details:

* The support team will provide you with:
  * **Group IDs**: Unique identifiers for each group.
  * **Subscription Keys**: Codes used to subscribe to specific MS Teams channels.

## Step 2: Subscribing MS Teams Channels

1. **Log into MS Teams**: Open the MS Teams application and navigate to the channel where you want to receive the 2FA login requests.
2. **Subscribe MS Teams Channel**: Use the provided Subscription Key to [subscribe the channel](/h2fa/guides/subscribing-ms-teams-channel.md) to requests for the corresponding group.

## Step 3: Assigning Machines to Groups

### During Installation

1. **Install the Twosense Endpoint Agent**:
   * During the installation of the endpoint agent on a machine, you will see a field labeled “**Group ID**” in the GUI installer.
2. **Enter the Correct Group ID**:
   * Enter the **Group ID** corresponding to the appropriate group for that machine.
   * Ensure that the correct Group ID is used to avoid misrouting requests.

### Post-Installation (Using Registry Key or Group Policy)

1. **Modify the Registry Key**:
   * If you need to assign or change the Group ID after installation, modify the registry key on the machine.
   * Navigate to the registry path `HKEY_LOCAL_MACHINE\SOFTWARE\TWOSENSE.AI\TwosenseAuthenticator` and update the `GroupId` key.
2. **Using Group Policy**:
   * You can also deploy Group IDs via Group Policy for multiple machines.
   * Update the **Computer Configuration** → **Preferences** → **Windows Settings** → **Registry** Group Policy to set the Group ID for each machine.


---

# 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.twosense.ai/h2fa/guides/using-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.
