
## Integrate with custom app (legacy)

URL: https://docs.atlan.com/product/integrations/collaboration/microsoft-teams/how-tos/integrate-microsoft-teams-custom-app

> Connect Atlan to Microsoft Teams using the custom app approach. Use this method if you have an existing legacy setup or need specific deployment configurations.

This page describes how to connect Atlan with Microsoft Teams using the **custom app (legacy)** integration method.

:::warning Important
The custom app (legacy) setup is no longer supported for new integrations. It continues to function for existing configurations, and no immediate action is required. 

If your workspace uses the legacy integration and you want to switch to the new experience, first disconnect the existing custom app setup in Atlan. Then remove the legacy Atlan app from your [Microsoft Teams Admin Center](https://admin.teams.microsoft.com/). 

After removing the legacy app, configure the [Microsoft Teams Marketplace App](https://docs.atlan.com/llms/governance/integrations/integrate-microsoft-teams/llms.txt) to complete the new setup.

:::

## Prerequisites

Before you begin, make sure you have:

- An [admin access](https://docs.atlan.com/llms/governance/access-control/delegate-administration/llms.txt) in Atlan to configure the Microsoft Teams integration. 

- You also need inputs and approval from the [_Application Administrator_](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#application-administrator) and [_Teams Administrator_](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#teams-administrator) of your Microsoft Teams workspace.

## Integrate Microsoft Teams

To integrate Microsoft Teams and Atlan using the custom app approach, follow these steps.

### Retrieve team link

To retrieve the team link, from within Microsoft Teams:

1. In the left menu in _Microsoft Teams_, click **Teams**.
2. Under _Teams_, navigate to your team, and to the right of the team name, click the **three dots**.
3. From the dropdown menu, click **Get link to team**.
4. From the _Get a link to the team_ dialog, click **Copy** to copy the team link and save it in a temporary location.

### Connect Atlan to Microsoft Teams

Once you have retrieved the team link, you can proceed to connecting Atlan to Microsoft Teams.

Atlan requires the following delegated permissions for the Microsoft Teams integration:

- `offline_access` - lets the Atlan app access resources on behalf of the users, even when users aren't currently using the app.
- `User.Read` - lets users sign in to the app, and lets the app read the profile of signed-in users.
- `AppCatalog.Submit` - lets the app submit application packages to the catalog and cancel submissions that are pending review on behalf of the signed-in user.
- `ChannelMessage.Read.All` - lets the app read a channel's messages in Microsoft Teams, on behalf of the signed-in user (only required if you have admin access to publish the app in Microsoft Teams).
- `AppCatalog.ReadWrite.All` - lets the app create, read, update, and delete apps in the app catalogs (only required if you have admin access to publish the app in Microsoft Teams).
- `TeamsAppInstallation.ReadWriteSelfForUser` - lets a Teams app to read, install, upgrade, and uninstall itself for the signed-in user.

From within Atlan:

1. In your Atlan workspace, click **Settings** from the left menu.

 If you are using the **Old UI (Classic)**, from the left menu on any screen, click **Admin**.

2. Click **Integrations**.
3. In the _Microsoft Teams_ tile, click **Connect**.
4. In the _Add to Microsoft Teams_ dialog, for _Team link_, paste the [team link you copied](https://docs.atlan.com/llms/governance/integrations/integrate-microsoft-teams-custom-app/llms.txt) from Microsoft Teams.
5. Click **Next** to continue.
6. For _Publish the Atlan app_:
 - If you have [_Application Administrator_](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#application-administrator) access to Microsoft Teams:
 - Click **Publish now** to publish the Atlan app in your Microsoft Teams workspace.
 - In the _Permissions requested_ popover, check the box for **Consent on behalf of your organization** to automatically grant access to the application for all users and then click **Accept** to publish the Atlan app.
 - If you don't have admin access to Microsoft Teams:
 - Click **Request to publish**.
 - In the _Permissions requested_ popover, click **Accept** to publish the Atlan app.
 - Contact your Microsoft Teams administrator to [approve](https://learn.microsoft.com/en-us/microsoftteams/submit-approve-custom-apps#approve-the-submitted-app) and [publish](https://learn.microsoft.com/en-us/microsoftteams/submit-approve-custom-apps#publish-the-app-to-your-users) the Atlan app in your Microsoft Teams workspace.

:::info **Did you know?** 
 If your global administrator has enabled the [admin consent workflow](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/configure-admin-consent-workflow), you're prompted to request admin approval while attempting to install the Atlan app in your Microsoft Teams workspace. Reach out to your admin to [approve the admin consent request](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/review-admin-consent-requests#review-and-take-action-on-admin-consent-requests) from the Microsoft Entra admin center. Additionally, if there's any [expiry date](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/configure-admin-consent-workflow#enable-the-admin-consent-workflow) set for such requests, make sure that the request is approved within that period of time, otherwise you need to request approval again.
:::

### Add Atlan to Microsoft Teams directory

:::warning

You _must_ wait 24 hours after [setting up the Microsoft Teams integration in Atlan](#integrate-microsoft-teams) before adding the Atlan app to your Microsoft Teams directory. This is required for the Atlan app to be activated in Microsoft Teams. To learn more, refer to [Microsoft Teams documentation](https://learn.microsoft.com/en-us/microsoftteams/app-centric-management#add-or-modify-app-availability-for-users).

:::

Once the Atlan app has been published in your Microsoft Teams workspace, you need your [_Teams Administrator_](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#teams-administrator) to add Atlan to your Microsoft Teams directory.

From within Microsoft Teams:

1. Log in to the [Microsoft Teams admin center](https://admin.teams.microsoft.com/) with [_Teams Administrator_](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#teams-administrator) access.
2. In the left menu of _Microsoft Teams_, click **Teams apps** and then click **Manage apps**.
3. On the _Manage apps_ page, use the search bar to search for the **Atlan** app.
4. To the left of the app name, click the circle to select the **Atlan** app.
5. From the tabs along the top of the _All apps_ section, click **Add to a team**.
6. In the _Add to a team_ form, configure the following:
 1. Click the search bar and enter the name of the team to which you want to add the Atlan app. Hover over the team name and then click **Add**.
 2. Click **Apply** to confirm your selections.

Atlan is now connected to Microsoft Teams! 🎉

### Configure integration from Atlan to Microsoft Teams

Now that Atlan is connected to Microsoft Teams, you can configure the Microsoft Teams integration from Atlan.

From the _Integrations_ sub-menu:

1. Expand the _Microsoft Teams_ tile.
2. Under the _Configurations_ tab, configure the following:
 1. For any existing Microsoft Teams integrations prior to February 22, 2024 only, you need to update the Atlan app in your Microsoft Teams workspace to use new features like [enabling notifications for starred assets](https://docs.atlan.com/llms/catalog/discovery/star-assets/llms.txt):

 - If you have [_Application Administrator_](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#application-administrator) access to Microsoft Teams:
 - Click **Install now** to update the Atlan app in your Microsoft Teams workspace.
 - In the _Permissions requested_ popover, click **Accept** to update the Atlan app.
 - If you don't have admin access to Microsoft Teams:
 - Click **Request update**.
 - Contact your Microsoft Teams administrator to [update](https://learn.microsoft.com/en-us/microsoftteams/submit-approve-custom-apps#update-a-custom-app) the Atlan app in your Microsoft Teams workspace.
 - Once updated, click **Check status** in Atlan to view the status of your requested update.

 :::info

 💪 **Did you know?** For all new Microsoft Teams integrations from February 22, 2024 onward, no additional configuration required.

 :::

 2. For _Channels_, enter channels to use in your Microsoft Teams workspace to let users post to from within Microsoft Teams or [get notified about glossary updates](https://docs.atlan.com/llms/governance/integrations/microsoft-teams-integration/llms.txt). Enter the channel name without a `#`, and press tab after each channel if you want to enter multiple channels.
 3. (Optional) For _Announcements channel_, enter the name of a single channel that can be used to view [announcements on assets](https://docs.atlan.com/llms/governance/integrations/create-announcements/llms.txt) in Atlan.
 4. (Optional) For _Workflows alert channel_, enter the name of a single channel that can be used to see [alerts for workflow activities](https://docs.atlan.com/llms/governance/integrations/microsoft-teams-integration/llms.txt) in Atlan. You can also choose to receive failure alerts only by toggling on the _Receive failure alerts only_ slider.
 5. (Optional) For _Playbooks alert channel_, enter the name of a single channel that can be used to see [alerts for playbook runs](https://docs.atlan.com/llms/governance/playbooks/manage-playbooks/llms.txt) in Atlan. You can also choose to receive failure alerts only by toggling on the _Receive failure alerts only_ slider.
3. At the bottom of the tile, click the **Update** button.

Users can now post to Microsoft Teams without leaving Atlan! 🎉

## Link your Microsoft Teams account

To receive alerts for [starred assets](https://docs.atlan.com/llms/catalog/discovery/star-assets/llms.txt) directly in your Microsoft Teams account, you need to link your Teams account to Atlan. 
This linking lets Atlan send direct notifications to your Microsoft Teams chat. It's performed automatically for the user who set up the Microsoft Teams integration, but other users must link their accounts manually.

To link your Microsoft Teams account:

1. Click your name to open the menu.
 * If you are using the **Old UI (Classic)**, click your name in the upper right corner.
 * If you are using the **New UI**, click your name in the bottom left corner.

2. From the dropdown, click **Profile**.

3. In the resulting dialog, click the **four dots icon** to access integrations.

4. Under **Teams**, click the **Connect** link.

5. In the resulting popup, scroll to the bottom and select **Allow**.

Your Microsoft Teams account is now linked and you'll receive starred asset alerts directly in Teams.

:::info **Did you know?** 
Channels need to be [standard](https://support.microsoft.com/en-us/office/standard-private-or-shared-channels-in-microsoft-teams-de3e20b0-7494-439c-b7e5-75899ebe6a0e) for Atlan to be able to post to them. If you try to integrate a private or shared channel, you see an error for that channel when you try to update.
:::

---
