# Microsoft Teams Deployment

This guide outlines the steps required to set up the Twosense bot within your Microsoft Teams environment. The process includes creating a custom app, uploading the bot, configuring permissions, and installing the bot into a Team.

{% hint style="warning" %}
These changes can take anywhere between a few minutes and up to 24 hours to take effect. This is a limitation of the Microsoft Teams product.
{% endhint %}

## Allow custom apps

1. Navigate to [Microsoft Teams Manage Apps](https://admin.teams.microsoft.com/policies/manage-apps)
2. Click on **Teams apps**, then select **Setup policies**.
3. You will see a list of policies applied to your users. For detailed precedence rules, refer to [Microsoft's policy precedence documentation](https://learn.microsoft.com/en-us/microsoftteams/assign-policies-users-and-groups#precedence-rules).
4. Ensure that the **Allow custom apps** option is enabled for users who will use the Twosense MFA bot. For example, if you only have the **Global policy** that applies to all users, it should look like this:

<figure><img src="https://3434375763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwlYUJFxBryM1EMRheRxm%2Fuploads%2Fgit-blob-58f48b091ab3d07b6ae28131da2c760615ee61e8%2Fteams-admin-2.png?alt=media" alt=""><figcaption></figcaption></figure>

## Upload Twosense Bot to Teams

1. Navigate to [Microsoft Teams Manage Apps](https://admin.teams.microsoft.com/policies/manage-apps)
2. Click on **Teams apps**, then select **Manage Apps**
3. Click **Actions** in the top-right corner and choose **Upload new app**.
4. Click **Upload** and select the file `TwosenseMsTeamsBot-x.y.z.zip` provided by your Twosense Account Manager.

## Edit app permissions

1. Navigate to [Microsoft Teams Manage Apps](https://admin.teams.microsoft.com/policies/manage-apps)
2. Click on **Teams apps**, then select **Manage Apps**.
3. Search for **Twosense MFA** and click on the app name.
4. Go to **Users and Groups**. If you can't find this section, refer to [Microsoft’s app-centric management guide](https://learn.microsoft.com/en-us/microsoftteams/app-centric-management).
5. Click **Edit availability** and choose one of the following options:
   * **Everyone**: All users in your organization can use the app.
   * **Specific users or groups**: Ensure all users who will approve requests are listed.

<figure><img src="https://3434375763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwlYUJFxBryM1EMRheRxm%2Fuploads%2Fgit-blob-be8bddddd2f08542251e022089528116c8dab48e%2Fteams-admin.png?alt=media" alt=""><figcaption></figcaption></figure>

## Add Twosense Bot to a Team

1. Navigate to [Microsoft Teams Manage Apps](https://admin.teams.microsoft.com/policies/manage-apps)
2. Click on **Teams apps**, then select **Manage Apps**.
3. Search for **Twosense MFA** and click on the checkbox to the left of the app name.
4. Click on **Add to Team**.
5. Search for the team where you want to install the bot and click **Apply**

<figure><img src="https://3434375763-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwlYUJFxBryM1EMRheRxm%2Fuploads%2Fgit-blob-2d89ccde65090c62fb53db9bab12d38d685da67f%2Fteams-admin-3.png?alt=media" alt=""><figcaption></figcaption></figure>

If you encounter any issues, please contact <support@twosense.ai>.
