Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Teams

Scalekit connector
Open markdown

The Teams connector lets your AI agent act in each user's Teams account. Each user signs in to Teams once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 82 tools.

Tools
82
What they doRead · write · destructive
28 · 42 · 1228 read42 write12 destructive
Users sign in with
OAuth app
Scalekit's or your own

What you can do

  • Send and read messages: post, reply to, edit, and read messages in channels and chats
  • Search messages: find chat and channel messages across everything the user can access
  • Manage teams and channels: create, update, archive, and delete teams and channels, and add or remove members
  • Run online meetings: schedule and update meetings, and pull transcripts, recordings, and attendance reports
  • Manage chats: start one-on-one or group chats and add or remove chat members
  • Handle shifts and time off: create shifts, request swaps, and approve or decline time-off requests

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Teams connection

    In AgentKit > Connections, create a Teams connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for Teams, so you don't need to register an OAuth app. To show your own app on the consent screen, use your own credentials instead.

    Use your own OAuth app

    Register your Scalekit environment with the Microsoft Teams connector so Scalekit handles the authentication flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:

    1. Register an Azure app

      • In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find Teams and click Create. Copy the redirect URI. It will look like https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback.

        Copy redirect URI from Scalekit dashboard

      • Sign into portal.azure.com and go to Microsoft Entra ID → App registrations → New registration.

      • Enter a name for your app.

      • Under Supported account types, select Accounts in any organizational directory (Any Azure AD directory - Multitenant).

      • Under Redirect URI, select Web and paste the redirect URI from step 1. Click Register.

        Register an application in Azure portal

      • Go to Certificates & secrets → New client secret, set an expiry, and click Add. Copy the Value immediately.

      • From the Overview page, copy the Application (client) ID.

    2. Create an Azure bot

      • In the Azure portal, search for Azure Bot and click Create.

      • Enter a bot handle name, select your subscription and resource group, and set the Microsoft App ID to the Application (client) ID from above. Click Review + create.

        Azure Bot setup

      • Once created, go to Channels and add the Microsoft Teams channel to enable Teams integration.

    3. Add credentials in Scalekit

      • In Scalekit dashboard, go to AgentKit > Connections and open the connection you created.

      • Enter your credentials:

        Add credentials in Scalekit dashboard

      • Click Save.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'microsoftteams'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Teams:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'microsoftteams_list_all_teams',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • microsoftteams_get_channelRetrieve the properties and metadata of a specific channel in a Microsoft Teams team, including its display name, description, membership type, and web URL.Read-only

    Get Teams Channel

    Retrieve the properties and metadata of a specific channel in a Microsoft Teams team, including its display name, description, membership type, and web URL.

    Inputs

    channel_idstringrequired
    The unique identifier of the Teams channel to retrieve.
    team_idstringrequired
    The unique identifier of the Microsoft Teams team that contains the channel.
  • microsoftteams_get_channel_messageRetrieve a single message from a Microsoft Teams channel by its ID, including body content, sender info, attachments, reactions, and metadata.Read-only

    Get Teams Channel Message

    Retrieve a single message from a Microsoft Teams channel by its ID, including body content, sender info, attachments, reactions, and metadata.

    Inputs

    channel_idstringrequired
    The unique identifier of the Teams channel containing the message.
    message_idstringrequired
    The unique identifier of the Teams channel message to retrieve.
    team_idstringrequired
    The unique identifier of the Microsoft Teams team that contains the channel.
  • microsoftteams_get_chatRetrieve the properties of a single Microsoft Teams chat (without its messages), such as its topic, chat type, and creation time.Read-only

    Get Teams Chat

    Retrieve the properties of a single Microsoft Teams chat (without its messages), such as its topic, chat type, and creation time.

    Inputs

    chat_idstringrequired
    The unique identifier of the Teams chat.
  • microsoftteams_get_chat_messageRetrieve a single message from a Microsoft Teams chat by its ID, including body content, sender info, attachments, reactions, and metadata.Read-only

    Get Teams Chat Message

    Retrieve a single message from a Microsoft Teams chat by its ID, including body content, sender info, attachments, reactions, and metadata.

    Inputs

    chat_idstringrequired
    The unique identifier of the Teams chat that contains the message.
    message_idstringrequired
    The unique identifier of the Teams chat message to retrieve.
  • microsoftteams_get_meeting_transcript_contentDownload the text content of a specific Microsoft Teams meeting transcript, identified by the meeting ID and transcript ID (obtained from microsoftteams_list_meeting_transcripts).Read-only

    Get Meeting Transcript Content

    Download the text content of a specific Microsoft Teams meeting transcript, identified by the meeting ID and transcript ID (obtained from microsoftteams_list_meeting_transcripts). Returned as WebVTT-formatted text with timestamped speaker turns.

    Inputs

    meeting_idstringrequired
    The unique identifier of the online meeting the transcript belongs to.
    transcript_idstringrequired
    The unique identifier of the transcript to download. Obtain from microsoftteams_list_meeting_transcripts.
  • microsoftteams_get_online_meetingRetrieve details of a specific Microsoft Teams online meeting by meeting ID.Read-only

    Get Teams Online Meeting

    Retrieve details of a specific Microsoft Teams online meeting by meeting ID. Returns meeting properties including subject, join URL, start/end times, participants, and meeting options.

    Inputs

    meeting_idstringrequired
    The unique identifier of the online meeting to retrieve. Obtain from the create meeting response or list meetings API.
  • microsoftteams_get_teamRetrieve the properties and relationships of a Microsoft Teams team by its team ID.Read-only

    Get Teams Team

    Retrieve the properties and relationships of a Microsoft Teams team by its team ID. Returns team details including display name, description, visibility, member settings, and guest settings.

    Inputs

    team_idstringrequired
    The unique identifier of the Microsoft Teams team to retrieve.
  • microsoftteams_list_all_teamsList all teams in the organization's tenant, not just those the signed-in user has joined.Read-only

    List All Teams

    List all teams in the organization's tenant, not just those the signed-in user has joined. This is a tenant-wide directory query distinct from 'List Joined Teams' and typically requires an application permission such as Team.ReadBasic.All.

    Inputs

    filterstring
    OData filter expression to narrow results. Example: "displayName eq 'Engineering'".
    selectstring
    Comma-separated list of team properties to return. Reduces response payload size.
    topinteger
    Maximum number of teams to return per page. Use for pagination.

Workflows

Proxy API call
// Make a request via Scalekit proxy
const result = await actions.request({
connectionName: 'microsoftteams',
identifier: 'user_123',
path: '/v1.0/me',
method: 'GET',
});
console.log(result);
Execute a tool
const result = await actions.executeTool({
connector: 'microsoftteams',
identifier: 'user_123',
toolName: 'microsoftteams_list_teams',
toolInput: {},
});
console.log(result);