# Microsoft Teams

> Source: https://truto.one/docs/integration-guides/msteams/

Microsoft Teams connects through Microsoft Graph when a user signs in with their Microsoft work or school account (OAuth 2.0), through Truto's Microsoft app or your own.

## Install the Microsoft Teams integration

Install Microsoft Teams from [Available integrations](https://app.truto.one/integrations/available/a0d1e78a-e446-4026-8b32-8da958c4daba) in each environment you connect accounts from.

## Use your own Microsoft Teams OAuth app (optional)

Truto ships a Microsoft Teams OAuth app, so OAuth 2.0 works without any setup. To show your own app on the consent screen instead, register an app in Microsoft Entra ID that allows accounts in any organizational directory, register the redirect URL below, and set the app's Client ID and Client Secret on the installed integration. See [Overriding OAuth credentials](/docs/guides/integrations/overriding-oauth-credentials).

```text
https://api.truto.one/connect/msteams/callback
```

If you [use a redirect URL on your own domain](/docs/guides/integrations/overriding-oauth-credentials#use-a-redirect-url-on-your-own-domain), register that URL instead.

By default, Truto asks Microsoft Teams for these scopes. The Connect UI lists them under **Permissions required**, and you can change them when you override the OAuth credentials.

- `email`
- `offline_access`
- `openid`
- `profile`
- `https://graph.microsoft.com/Team.ReadBasic.All`
- `https://graph.microsoft.com/TeamMember.Read.All`
- `https://graph.microsoft.com/User.Read`

Enable the same scopes on your app. If your app allows fewer, change the list under **Use your own OAuth settings** → **Scopes** on the installed integration's **Configuration** tab to match.

## Connect a Microsoft Teams account

1. In [Integrated Accounts](https://app.truto.one/integrated-accounts), click **Connect Account**.
   ![Click Connect Account](https://docs-assets.truto.one/truto-connect-account.png)
2. Enter a **Tenant ID** (your customer's ID; Truto creates the tenant if it is new), or pick one under **Existing tenant (optional)**. Check the **Environment** and the **Region** (where Truto places the account; Western North America by default). To open the link straight on Microsoft Teams, pick it under **Advanced settings** → **Integration (optional)**. Click **Get connection link**.
   ![Get connection link](https://docs-assets.truto.one/truto-connect-account-modal.png)
3. Click the open-in-new-tab button, or click **Copy** and send the link to your customer so they connect their own Microsoft Teams account. The link works for 7 days, until an account is connected with it.
   ![Share connection link](https://docs-assets.truto.one/truto-connect-account-link.png)
4. Click **Get Started** if it shows, then select **Microsoft Teams**.
5. Pick **OAuth 2.0** and click **Connect**.
6. Sign in with a Microsoft account and allow access. Only work or school accounts can sign in. `TeamMember.Read.All` needs an administrator's consent, so an admin may have to approve the app first.
7. Close the tab when you see **Connection successful**. The new account appears under **Integrated Accounts**. Click its Account ID to see its details and make API calls.
