> ## Documentation Index
> Fetch the complete documentation index at: https://hoopdev-docs-improve-idp-sso-pages.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Teams

> Hoop.dev can integrate with Microsoft Teams, sending messages to a channel when a particular event happens.

## Requirements

* Permissions to obtain the incoming webhook URL from Microsoft Teams
* Admin user on hoop
* hoop.dev CLI installed in your local machine

<Frame>
  <img src="https://mintcdn.com/hoopdev-docs-improve-idp-sso-pages/quDT6RZSG6Ua5zfL/images/integrations/teams-1.jpg?fit=max&auto=format&n=quDT6RZSG6Ua5zfL&q=85&s=5c0e5b2b827414f2f252db709095346d" width="1684" height="800" data-path="images/integrations/teams-1.jpg" />
</Frame>

## Configuring

1. First, obtain the incoming webhook URL. Refer to [this section of the Microsoft Teams article](https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=dotnet#create-incoming-webhooks-1).
2. Log in to your hoop instance and create a plugin that allows access to the webhook dashboard.

```bash theme={null}
hoop login
hoop admin create plugin webhooks --overwrite
```

<Info>
  For self-hosted deployments it requires the Svix webhook provider deployed locally or using their SaaS instance. Refer to the [Svix documentation](/integrations/svix) for more information.
</Info>

Access the webhook provider dashboard.

```bash theme={null}
hoop admin webhooks-dashboard
```

### Create an Endpoint

Create an endpoint by adding the URL obtained when creating an incoming webhook in the previous step. And select the events that you wish to send.

<Frame>
  <img src="https://mintcdn.com/hoopdev-docs-improve-idp-sso-pages/quDT6RZSG6Ua5zfL/images/integrations/teams-2.png?fit=max&auto=format&n=quDT6RZSG6Ua5zfL&q=85&s=ad3f72d4dafe62f870e9ff9e91ed7a15" width="2000" height="1778" data-path="images/integrations/teams-2.png" />
</Frame>

<Info>
  In the advanced section, make sure to **enable the endpoint rate limit and set it to 4 (per second).** This will respect the limitations enforced by the Microsoft Teams service.
</Info>

### Send a Test Event

Go to the Testing tab, select the available event, and click on the **Send Example** button. This event should be received in the configured Teams channel.

In the "Overview" tab, the test with the sent event will be displayed.

<Frame>
  <img src="https://mintcdn.com/hoopdev-docs-improve-idp-sso-pages/quDT6RZSG6Ua5zfL/images/integrations/teams-3.png?fit=max&auto=format&n=quDT6RZSG6Ua5zfL&q=85&s=3c4c8e3cbff9e04168acd683539261f6" width="2000" height="187" data-path="images/integrations/teams-3.png" />
</Frame>

## Connections

Now, you can define which connections will send this event based on the plugin configuration. Update or add a new connection to enable this plugin.

```bash theme={null}
hoop admin create conn bash -a <agent-name> --overwrite \
  --plugin webhooks \
  --reviewers admin -- bash
```

Interacting with the connection via the webapp or the CLI will trigger an alert indicating that an access request has been created. A message will be sent to the Microsoft Teams channel.

```bash theme={null}
hoop exec bash -i 'ls -l'
```

## Supported Events

* `microsoftteams.review.create` - Triggered when an access request is created
