# Microsoft Teams

Receive instant Suger notifications and alerts in your Microsoft teams channels.

--- 


## Overview 
By connecting with the Suger app in your Microsoft Teams, you and your team can receive instant notifications and alerts about important sales & revenue events occurring across all your cloud marketplaces.

### Org-Level vs User-Level

- **Org-Level**: Uses the Teams app + webhook for organization-wide notifications. Administrators set up the integration for the entire organization.
- **User-Level**: Each user connects their personal Microsoft Teams to receive notifications individually.


## Create Integration
In your [Suger Console Integration](https://console.suger.io/settings?tab=integrations), you will see the Microsoft Teams integration connection status. Click the `Connect` button to download the `Suger Microsoft Teams app package` and copy the `Binding Token` for future use.

> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/24648449-611e-434c-6c40-ff7d98554c00/public" alt="Microsoft Teams integration Connect button in Suger Console" style="max-width:600px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>


### Install Suger Microsoft Teams app
1. Choose the channel you want to send notifications to, then click the `Add a tab` button as shown below.
> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/b1ef257d-5f8a-4654-0d4f-bb1dcde77c00/public" alt="Add a tab button in Microsoft Teams channel" style="max-width:880px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>

2. Click **Manage your apps**.
> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/82e22f8b-6ab3-45d5-b2c4-7659ba942100/public" alt="Manage your apps menu option in Microsoft Teams" style="max-width:600px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>

3. Click button **Upload an app**, then choose the `Suger Microsoft Teams app package` you downloaded.
> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/80563563-aab9-4e46-19dd-ffb4cd0db900/public" alt="Upload an app dialog in Microsoft Teams" style="max-width:600px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>

4. Click button **Add**.
> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/c267257e-2a83-42c6-127b-2bf04e476000/public" alt="Add button for Suger Teams app package" style="max-width:600px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>

5. Click button **Set up**.
> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/d53c4043-15a3-4ceb-b2b2-c962aab75d00/public" alt="Set up button for Suger Teams app" style="max-width:600px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>

6. After the app setup is completed, a new tab named **Suger** will appear in the channel. Click **Suger** tab.
> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/f2828749-38b3-4f82-f0d6-2476a53ff100/public" alt="Suger tab added to Microsoft Teams channel" style="max-width:600px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>

7. In the **Suger** tab, you can change channel name as you like, and paste the **Binding Token** you get from Suger console. click `Save`. Now your channel is bound to Suger console.
> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/8e0d4e16-505f-4ac1-01b5-6590c70d2000/public" alt="Suger tab with binding token field and Save button" style="max-width:600px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>


### Verify Microsoft Teams Integration
After you successfully bind the channel to the Suger console, you will see an integration created on the Suger console.
> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/fcf8b8aa-be36-4572-b316-b409a6f79100/public" alt="Microsoft Teams integration listed in Suger Console" style="max-width:600px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>

You need to click the **Verify** button to ensure the bound channel is working. After you click the Verify button, a verification message will be sent to the bound channel.

## Suger AI Tools

Suger AI uses a **middleware** strategy — wrapping the Microsoft Graph Teams API directly.

> **Org-level and user-level**: Both integration levels are supported. User-level takes precedence when both are connected.

| Tool | Description |
|------|-------------|
| `msteams_list_teams` | List Teams teams (IDs and display names) |
| `msteams_list_channels` | List all channels in a team |
| `msteams_list_messages` | List recent messages in a channel |
| `msteams_get_message` | Get the full content of a channel message |
| `msteams_send_message` | Post a new message to a channel (plain text or HTML) |
| `msteams_reply_to_message` | Reply to an existing channel message thread |

## Edit Integration
If you have successfully bound multiple channels within Suger, you can specify the channel to which the notification will be sent by default via setting the default channel.
> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/ced053aa-95d3-4240-3414-cc409cef8400/public" alt="Default notification channel setting for Microsoft Teams" style="max-width:600px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>

## Delete Integration

The Microsoft Teams integration can be deleted like all other integrations. Once the deletion is triggered, all integration info including the access token will be deleted immediately & permanently from Suger. No time window or methods to recover. 

:::warning
- To completely delete the integration, please uninstall the **Suger** app from your Microsoft Teams.
:::


## Create User Integration

Use user-level integration to receive notifications in your personal Microsoft Teams.

1. Click `Connect Now` button in the User Integrations section
2. You will be redirected to Microsoft to authorize
3. Select the channel where you want to receive notifications
4. Return to Suger to confirm connection

:::warning
Deleting the integration will stop all notifications to your Teams channel.
:::

## Type of Notifications

Each type of Notifications consists of the **Entity** and **Action**. There are 2 entity types and 7 action types. They are listed below:

|  |  | 
| ---------------- | :-------- |
| `Entity` | The type of the `entity` who can do `action` is one of:<ul><li>`OFFER`</li><li>`ENTITLEMENT`</li></ul>  |
| `Action` | The action performed. Can be one of:<ul><li> `CREATE`: the entity is created.</li><li>`PENDING_START`: the entity `ENTITLEMENT` is pending to start.</li><li>`CANCEL`: the entity is cancelled. </li><li>`PENDING_CANCEL`: the entity `ENTITLEMENT` is pending to be cancelled.</li><li>`SUSPEND`: the entity is suspended, it may be reinstated or cancelled in the future.</li><li>`REINSTATE`: the entity is reinstated from suspended state.</li><li>`UPDATE`: the entity is updated.</li><li>`EXPIRE`: the entity `OFFER` is expired</li><li>`TEST`: for testing purpose only.</li></ul> |


Here is an example of notification you will receive in your Microsoft Teams channel when a new entitlement is created:
> <img src="https://imagedelivery.net/pNNvR2_tZYczcQ3leBU_1A/6f23c073-ceb7-4454-8aae-5984f79c3500/public" alt="Example entitlement notification in Microsoft Teams channel" style="max-width:600px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee"/>
