> For the complete documentation index, see [llms.txt](https://docs.getmesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getmesa.com/connect/microsoft_teams.md). Agents can also search and read this documentation through its [MCP server](https://docs.getmesa.com/~gitbook/mcp).

# Microsoft Teams

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fgit-blob-22af02e00fde75ec1ebde815f47a0908ea827c9b%2Fmicrosoft_teams-connect.png?alt=media" alt="Screenshot of a Microsoft Teams step in the MESA workflow builder, not yet connected. Spotlight the Sign in with Microsoft Teams button."><figcaption></figcaption></figure>

## Connection <a href="#connect" id="connect"></a>

When you're setting up your first workflow with Microsoft Teams, you will need to create a [Connection](https://docs.getmesa.com/going-further/credentials.md) in order to connect MESA with Microsoft Teams.

1. In your Microsoft Teams step, click Sign in with Microsoft Teams.
2. In the Microsoft window that opens, sign in.
3. Approve MESA.

Use the work or school account you use for Microsoft Teams. Once connected, you can choose the same connection in any Microsoft Teams step. To connect another account, open the connection menu and click Add another connection.

Some steps and triggers, such as Create Channel, List Team Members and New Channel Message, need more access than a new connection has. These steps show "Additional permissions required". Click Update, then approve the extra access in the Microsoft window.

{% hint style="warning" %}
Some of that extra access may need approval from a Microsoft 365 admin in your organization. If Microsoft shows "Need admin approval", ask your admin to approve MESA, then try again.
{% endhint %}

## Configure <a href="#configuration" id="configuration"></a>

### Triggers <a href="#triggers" id="triggers"></a>

Microsoft Teams triggers start your workflow when something happens in Microsoft Teams. Use the dropdowns to choose what to watch, such as a Team and Channel.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fgit-blob-c84da6ea6db16c76441e4cd3fb0e91c4f2c2e997%2Fmicrosoft_teams-trigger.png?alt=media" alt="Screenshot of the Microsoft Teams New Channel Message trigger in the MESA workflow builder, with a team and channel selected. Spotlight the Team and Channel dropdowns."><figcaption></figcaption></figure>

Channel triggers: New Channel, New Channel Message, New Channel Mention, New Reply to Message, New Channel Reaction and Keywords Mentioned in Channel.

Chat triggers: New Chat, New Chat Message, New Chat Mention, New Chat Reaction and Keywords Mentioned in Chat.

Team triggers: New Team, New Team Member, Team Member Removed and New Chat Member.

Meeting triggers: New Meeting Recording and New Meeting Transcript. These start when the recording or transcript of a meeting you organized is ready.

Mention triggers start when someone mentions the person whose Microsoft account is connected to the step. Keywords Mentioned triggers start when a new message contains any of the words or phrases in the Keywords field. Matching is not case-sensitive.

### When Triggers Start <a href="#when-triggers-start" id="when-triggers-start"></a>

Most triggers start your workflow within seconds of the change in Microsoft Teams.

New Team and Team Member Removed check Microsoft Teams on a schedule instead, because Microsoft doesn't send a notice for these changes. They run hourly by default. To check more often, choose a shorter schedule in the Repeats setting.

New Team, New Team Member, Team Member Removed and New Chat Member work by comparing the current list of teams or members with the last one they saw. When you turn on the workflow, MESA saves the current list, so these triggers only start for changes made after that.

### Test and Time Travel <a href="#test-and-time-travel" id="test-and-time-travel"></a>

Test shows real records from your Microsoft Teams account, in the same format as a live run. [Time Travel](https://docs.getmesa.com/workflow-activity/time-travel.md) shows the newest records first, for any date range, including one that runs up to today. A few triggers don't support Time Travel. See Technical Notes below.

### Dropdowns <a href="#dropdowns" id="dropdowns"></a>

Team, Channel, Chat, Message and Person fields are dropdowns that list what's in your Microsoft Teams account, so you don't need to look up IDs. Some dropdowns depend on the field above them, so fill them in order. Choose a Team, and the Channel dropdown lists that team's channels. Choose a Channel, and the Message dropdown lists that channel's messages, then the Reply dropdown lists replies to the message you chose. In chat steps, choose a Chat first, and the Message dropdown lists that chat's messages. The Person dropdown lists the members of the Team you chose.

Meeting ID isn't a dropdown, because Microsoft Teams can't list your meetings. Fill it with the Meeting ID from a Create Online Meeting, New Meeting Recording or New Meeting Transcript step.

### Actions <a href="#actions" id="actions"></a>

Microsoft Teams actions send and read messages, and manage channels, chats, teams, online meetings and your status.

Channel message actions: Send Channel Message, Reply to Channel Message, Update Channel Message, Delete Channel Message, Get Channel Message, Get Channel Message Reply, List Channel Messages and List Channel Message Replies.

Chat actions: Send Chat Message, Send Message to Myself, Create Chat, Rename Chat, Add Chat Member, List Chat Members, Get Chat, List Chats, Get Chat Message, List Chat Messages and Update Chat Message.

Channel and team actions: Create Channel, Get Channel, Get General Channel, List Channels, Update Channel, Archive Channel, Unarchive Channel, Delete Channel, Get Team, List My Teams, List Team Members, Add Team Member and Remove Team Member.

Meeting, status and profile actions: Create Online Meeting, Get Online Meeting, Update Online Meeting, Delete Online Meeting, List Meeting Recordings, List Meeting Transcripts, Set Status, Reset Status and Get My Profile.

In the Send Channel Message action, choose the Team and Channel, then write your Message. Set Format to Plain text, or to HTML for bold text, links and lists. Set Importance to Normal, High or Urgent to flag the message.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fgit-blob-2a7835d9e6d72912e09179b338f7468accecb4d8%2Fmicrosoft_teams-action.png?alt=media" alt="Screenshot of a Microsoft Teams Send Channel Message step in the MESA workflow builder, with fields filled in. Spotlight the Team, Channel and Message fields."><figcaption></figcaption></figure>

To fill a field with data from an earlier step, such as an order number, use [MESA's Variables feature](https://docs.getmesa.com/workflow-builder/fields/variables.md).

## Technical Notes <a href="#technical" id="technical"></a>

* Messages are sent from the connected Microsoft Teams account, not from a bot. That account must be a member of the channel.
* Triggers that watch messages, mentions, replies, reactions and keywords only see what the connected account can see in Microsoft Teams.
* Microsoft doesn't store a date for New Team, New Team Member, Team Member Removed and New Chat Member, so [Time Travel](https://docs.getmesa.com/workflow-activity/time-travel.md) isn't available for them. Their Test shows the current teams or members.
* Microsoft Teams can't list your recordings or transcripts, so New Meeting Recording and New Meeting Transcript have no Test records and no [Time Travel](https://docs.getmesa.com/workflow-activity/time-travel.md).
* Meetings created with Create Online Meeting have no calendar event, so they have no recordings or transcripts.
