How to connect Microsoft Teams to Composio

4 min read

Composio connects AI agents to Microsoft Teams so they can work with chats, messages, teams, and channels. Access is limited by the permissions you approve and your account’s existing access.

This guide shows you how to set up OAuth credentials and connect Microsoft Teams to Composio.

Part 1: Connect Microsoft Teams with Composio Managed OAuth

Step 1: Create an Auth Config and Select Microsoft Teams

1. Go to Auth Configs in the Composio Dashboard and click Create.

Auth Configs page in the Composio Dashboard with the Create button

2. Search for Microsoft Teams and select it from the results.

Create Auth Config dialog with Microsoft Teams selected

Step 2: Name the Config and Choose Composio Managed

1. Enter a Config Name for your auth config (the screenshots use Teams Managed Guide) and click Next.

Config Name field for the managed Microsoft Teams auth config

2. Under Authentication Method, select OAuth 2.0. Under Credentials, select Composio Managed.

OAuth 2.0 and Composio Managed selected in the auth config form

3. Under Scopes, choose permissions required by your integration and supported by your app registration. Click Create Auth Config.

Permission reference. For updating chat properties, the minimum delegated permission is Chat.ReadWrite. User.Read supports profile access and offline_access continued access. Other Teams operations can require different permissions. Choose for your own workflow; the screenshots are examples. Microsoft permission reference.

Scopes list for the managed Microsoft Teams auth config with Chat.ReadWrite, offline_access and User.Read selected

Step 3: Connect Your Microsoft Account

1. Open the auth config and click Connect Account. Then open the generated link.

Connect Account button on the managed Microsoft Teams auth config

2. Select the work or school Microsoft account you want to connect and sign in. A personal Microsoft account cannot connect to Teams.

Microsoft Pick an account page

3. If Microsoft asks for permissions, review them and click Accept only if they are appropriate for this account. You may not see this prompt if the account has already consented to these permissions. If your organization restricts app consent, an administrator may need to approve the request before the connection can complete.

Microsoft Permissions requested page for the managed Composio Microsoft Teams app

Step 4: Confirm the Connected Account Is Active

1. Back in Composio, open the Accounts tab on the auth config. The connected account should show an Active status. The Enabled status at the top of the page refers to the auth config itself, not to a connected account.

Connected Microsoft Teams account showing Active status in Composio

Part 2: Use your own OAuth credentials

Step 1: Register an App in Microsoft Entra ID

1. Sign in to the Azure portal, open App registrations, and click New registration. Microsoft’s app registration quickstart covers the same steps.

App registrations page in the Azure portal

2. Name the app and select Any Entra ID Tenant + Personal Microsoft accounts for this example. Select Web, enter the callback below and click Register. Teams connections require a work or school account.

https://backend.composio.dev/api/v1/auth-apps/add

Register an application form with name, supported account types and Web redirect URI

Step 2: Copy the Client ID and Create a Client Secret

1. On the app’s Overview page, copy the Application (client) ID. This is the Client ID you will enter in Composio.

App Overview page showing the Application (client) ID

2. Open Certificates & secrets and click New client secret.

Certificates and secrets page with the New client secret button

3. Add a description and choose an expiry that fits your rotation policy, then click Add. The screenshots use the description Composio OAuth Guides and a 180-day expiry. Plan to rotate the secret before it expires.

Add a client secret panel with description and expiry

4. Copy the secret Value immediately and store it privately. Use the Value, not the Secret ID. Azure shows the Value only once, so if you leave the page without copying it you will need to create a new secret.

Client secrets list showing the Value and Secret ID columns

Step 3: Add Microsoft Graph Permissions

1. Open API permissions and click Add a permission.

API permissions page with the Add a permission button

2. Select Microsoft Graph.

Microsoft Graph selected in Request API permissions

3. Choose Delegated permissions, so the app acts on behalf of the signed-in user.

Delegated permissions option in Request API permissions

4. Choose the delegated permissions needed for the operations your integration will use. Then click Add permissions.

Step 4: Create the Auth Config with Your Own Credentials

1. In the Composio Dashboard, go to Auth Configs, click Create, and select Microsoft Teams. Enter a Config Name (the screenshots use Teams Custom Guide) and click Next.

Config Name field for the custom Microsoft Teams auth config

2. Under Authentication Method, select OAuth 2.0. Under Credentials, select Your Own Credentials.

OAuth 2.0 and Your Own Credentials selected in the Microsoft Teams auth config form

3. Paste the Client id and the secret Value from your Entra app into Client secret. Leave the Redirect URI exactly as shown; it must match the redirect URI you registered in Step 1. For Microsoft cloud environment, keep global for the commercial Microsoft 365 cloud.

Credentials fields, Redirect URI and Microsoft cloud environment set to global for the custom Microsoft Teams auth config

4. Under Scopes, choose permissions required by your integration and supported by your app registration. Click Create Auth Config.

Scopes selected for the custom Microsoft Teams auth config

Step 5: Connect Your Microsoft Account

1. Open the auth config and click Connect Account. Then open the generated link.

Connect Account button on the custom Microsoft Teams auth config

2. Select the work or school Microsoft account you want to connect and sign in.

Microsoft Pick an account page for the custom Microsoft Teams app

3. Verify your app name, review the permissions and click Accept if appropriate. Leave organization-wide consent unchecked unless an administrator intends tenant-wide approval.

Microsoft Permissions requested page for the unverified custom Composio OAuth Guides app

Step 6: Confirm the Connected Account Is Active

1. Back in Composio, open the Accounts tab on the auth config. The connected account should show an Active status. The Enabled status at the top of the page refers to the auth config itself and does not mean an account is connected.

Connected account with Active status on the custom Microsoft Teams auth config

Your Microsoft Teams auth config is ready. Copy the Auth Config ID (ac_...) and use it in your application code or secret manager.

Share