PollyHub

Microsoft Teams Connector

Clean

Access Microsoft Teams with managed OAuth to read and send channel messages, manage chats, list teams and channels using the Microsoft Graph API.

SKILL.md

---
name: microsoft-teams-connector
description: "Access Microsoft Teams with managed OAuth. Read and send channel messages, manage chats, list teams and channels. Use when the user wants to send a Teams message, read channel messages, search Teams chats, list teams, or manage Teams channels. This is separate from the Microsoft 365 connector which covers Outlook mail, calendar, OneDrive, and Excel."
metadata:
  polly:
    polly_managed_connector: true
    auth:
      - env: TEAMS_ACCESS_TOKEN
        type: oauth2
        integration_id: microsoft-teams
        description: Microsoft Teams OAuth access
        scopes:
          - User.Read
          - Chat.Read
          - Chat.ReadWrite
          - Team.ReadBasic.All
          - Channel.ReadBasic.All
          - offline_access
    primaryEnv: TEAMS_ACCESS_TOKEN
---

# Microsoft Teams Connector

Access Microsoft Teams through the Microsoft Graph API using managed OAuth.

## First-Time Setup

If Microsoft Teams is not connected yet, run:

`manage_auth(action="connect", integration_id="microsoft-teams", auth_env="TEAMS_ACCESS_TOKEN")`

## Auth & Security

- Authentication is managed by Polly + Nango from `metadata.polly.auth`
- Never ask users to paste tokens in chat
- Never print or log token values
- If auth fails, reconnect with:
  `manage_auth(action="connect", integration_id="microsoft-teams", auth_env="TEAMS_ACCESS_TOKEN")`

## Base URL

`https://graph.microsoft.com/v1.0`

All requests include:

`Authorization: Bearer $TEAMS_ACCESS_TOKEN`

## Quick Usage

List joined teams:

```bash
curl -sS \
  -H "Authorization: Bearer $TEAMS_ACCESS_TOKEN" \
  "https://graph.microsoft.com/v1.0/me/joinedTeams"
```

List channels in a team:

```bash
curl -sS \
  -H "Authorization: Bearer $TEAMS_ACCESS_TOKEN" \
  "https://graph.microsoft.com/v1.0/teams/<teamId>/channels"
```

List channel messages:

```bash
curl -sS \
  -H "Authorization: Bearer $TEAMS_ACCESS_TOKEN" \
  "https://graph.microsoft.com/v1.0/teams/<teamId>/channels/<channelId>/messages"
```

Send a channel message:

```bash
curl -sS -X POST \
  -H "Authorization: Bearer $TEAMS_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"body":{"content":"Hello from polly!"}}' \
  "https://graph.microsoft.com/v1.0/teams/<teamId>/channels/<channelId>/messages"
```

List chats:

```bash
curl -sS \
  -H "Authorization: Bearer $TEAMS_ACCESS_TOKEN" \
  "https://graph.microsoft.com/v1.0/me/chats"
```

Get chat messages:

```bash
curl -sS \
  -H "Authorization: Bearer $TEAMS_ACCESS_TOKEN" \
  "https://graph.microsoft.com/v1.0/me/chats/<chatId>/messages"
```

Send a chat message:

```bash
curl -sS -X POST \
  -H "Authorization: Bearer $TEAMS_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"body":{"content":"Hello from polly!"}}' \
  "https://graph.microsoft.com/v1.0/me/chats/<chatId>/messages"
```

## Rules

- Use `/me` endpoints for the authenticated user's own teams and chats
- For pagination, pass `$top` and `$skipToken` from prior responses
- On API errors, surface status + response body clearly
- On 401/403, reconnect with:
  `manage_auth(action="connect", integration_id="microsoft-teams", auth_env="TEAMS_ACCESS_TOKEN")`
- Never log, echo, or expose credential values in any output
AuthorManasi
Downloads0
Versions1
Published1d ago
Auth Requirements
TEAMS_ACCESS_TOKENoauth2

integration: microsoft-teams

Version History

v1.0.0latest

Initial release

Apr 12, 2026

Clean.zip

SHA-256 (latest)

67fe18f2d0e0abb4a5aeb9cd67f9603941b3297ce6c09936a9d3b7a6ad274f9a