Skip to main content
skill CX Codex

microsoft-teams · acedatacloud — Claude Code skill: Teams chats via Graph

microsoft-teams lets the agent list Teams chats, read recent messages and send new ones through Microsoft Graph v1.0, calling the API with curl and jq.

Apache-2.0 178 installs ★ 17 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add AceDataCloud/Skills --skill microsoft-teams -a claude-code
Open on GitHub

What microsoft-teams does

The skill hands the agent the chat endpoints of Microsoft Graph v1.0. Inside are curl calls piped into jq, so it can pull the chat list with member names, show recent messages, and post a new one. Authorization comes from $MICROSOFT_TEAMS_TOKEN and rides along as a bearer header; the base URL is https://graph.microsoft.com/v1.0.

Only 1:1 and group chats are in scope. Teams channels are not: they call for ChannelMessage.Read.All plus tenant admin consent, and a request to /teams/{id}/channels/.../messages comes back 403. The delegated scopes used here are Chat.Read, Chat.ReadWrite and ChatMessage.Send, so no admin approval is involved. Outgoing text gets confirmed with you first.

A personal Microsoft login will not work. For outlook.com or hotmail accounts /me/chats answers 403 with the message “No authorization information present on the request”, since Graph only serves Teams chat to work or school identities — reconnecting the same account changes nothing. A 401 means the connection should be installed again. Message bodies in body.content often carry HTML, and the tags need stripping before anything is summarized.

What it helps with

  • pull the latest messages out of a group chat
  • post a short note into a 1:1 chat
  • locate a chat by the names of its members
  • summarize a conversation with the HTML removed

Example prompts for the agent

  • List my recent Teams chats along with their members
  • Read the last 20 messages in CHAT_ID and summarize them without markup
  • Send a message to CHAT_ID saying the call moved to 15:00

How to install microsoft-teams

1Skills CLI (Vercel)

npx skills add AceDataCloud/Skills --skill microsoft-teams -a claude-code

2Manually: put the files in place

~/.claude/skills/microsoft-teams/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/microsoft-teams/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about microsoft-teams

How to install microsoft-teams in Claude Code?

Run npx skills add AceDataCloud/Skills --skill microsoft-teams -a claude-code. The skill file lands at ~/.claude/skills/microsoft-teams/SKILL.md.

What does microsoft-teams do?

It reads and sends messages in Teams chats over Microsoft Graph v1.0. The agent can enumerate chats, show what was said recently, and post a reply once you approve the wording.

Can it read Teams channel messages?

No. Channels need the ChannelMessage.Read.All scope with tenant admin consent, and the skill deliberately does not request it, so those calls return 403.

Source text

SKILL.md · Apache-2.0
---
name: microsoft-teams
description: Read and send Microsoft Teams chat messages via Microsoft Graph v1.0. Use when the user mentions Microsoft Teams chats, a 1:1 or group chat, reading recent Teams messages, or sending a Teams chat message. (Channel messages are not covered — they need admin-consented scopes.)
when_to_use: |
  Trigger when the user wants to list their Teams chats, read recent
  messages in a chat, or send a chat message. Scoped to **chats**
  (1:1 / group) which use delegated `Chat.Read` / `Chat.ReadWrite` /
  `ChatMessage.Send` — no admin consent. Confirm before sending; do
  not attempt channel-message reads (different, admin-gated scopes).
connections: [microsoft/teams]
allowed_tools: [Bash]
license: Apache-2.0
metadata:
  author: acedatacloud
  version: "1.0"
---

Drive **Microsoft Teams chats** via Microsoft Graph with `curl + jq`. The user's
OAuth bearer token is in `$MICROSOFT_TEAMS_TOKEN`; every call needs
`Authorization: Bearer $MICROSOFT_TEAMS_TOKEN`. Base URL:
`https://graph.microsoft.com/v1.0`.

Failures are `{"error":{"code","message"}}` — show `message` verbatim. `401` =
re-install. `403`/`Forbidden` on send = the user granted read-only
(`Chat.Read`) → re-connect with `Chat.ReadWrite` + `ChatMessage.Send`.

**`403 "No authorization information present on the request"` on `/me/chats` =
the connected account is a *personal* Microsoft account.** Teams chat is a
work/school (organization) feature — Microsoft Graph does not expose `/me/chats`
or grant the `Chat.*` scopes for personal MSA accounts (outlook.com/hotmail/etc).
Tell the user plainly: "Microsoft Teams chat needs a work or school account;
your connected account is a personal Microsoft account. Reconnect Teams and
choose a work/school account." Do not retry — it cannot succeed for that account.

```bash
G="https://graph.microsoft.com/v1.0"; AUTH="Authorization: Bearer $MICROSOFT_TEAMS_TOKEN"
# My chats (1:1 + group), most recent first; expand members for names
curl -sS -H "$AUTH" "$G/me/chats?\$top=20&\$expand=members" \
  | jq '.value[] | {id, chatType, topic, members: [.members[].displayName]}'
```

## Read & send chat messages

```bash
CHAT="CHAT_ID"
# Recent messages
curl -sS -H "$AUTH" "$G/chats/$CHAT/messages?\$top=20" \
  | jq '.value[] | {from: .from.user.displayName, created: .createdDateTime, text: .body.content}'

# Send a message (confirm content with the user first). contentType html|text.
curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" \
  -d '{"body":{"contentType":"html","content":"Hi from the assistant 👋"}}' \
  "$G/chats/$CHAT/messages" | jq '{id, created: .createdDateTime}'
```

## Gotchas

- **Chats only.** Reading Teams **channel** messages needs
  `ChannelMessage.Read.All` — a Microsoft "protected API" requiring tenant-admin
  consent — which this connector deliberately does not request. Don't try
  `/teams/{id}/channels/.../messages`; it will 403.
- `body.content` for HTML messages contains markup — strip tags when
  summarizing.
- OData `$top`/`$expand` need the `$` escaped in the shell; quote the URL.

© acedatacloud · Apache-2.0 · AceDataCloud/Skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

microsoft-teams by other authors comes first.

microsoft-teams membrane Connects your AI agent to Microsoft Teams through Membrane CLI to read messages, post updates, and manage channels. CX Codex +1 248installs microsoft-teams-automation davepoon microsoft-teams-automation — a skill for Claude Code, Codex, Cursor and other agents that automates Microsoft Teams through Rube MCP (Composio): send messages, schedule meetings, manage channels. CX Codex +1 126installs teams-meeting-pipeline Hermes Agent + Teknium teams-meeting-pipeline manages Microsoft Teams meeting summaries, transcript ingestion, and Graph webhook subscriptions. Useful for replaying failed jobs and checking pipeline health. CX Codex +1 395installs Microsoft Teams API Maxim-Mazurok Microsoft Teams API connects Microsoft Teams with AI agents via the chat REST API. It lets your assistant check conversation feeds, post replies, and inspect members. CX Codex +1 ★ 9repo stars Microsoft 365 Teams mindstone The Microsoft 365 Teams MCP server lets an agent work with Teams chats, channel messages, and presence through Microsoft Graph. Use it to search conversations or send replies from your coding host. CX Codex +1 ★ 14repo stars service-itsm-teams-itdesk-configure forcedotcom service-itsm-teams-itdesk-configure configures the agent-side Salesforce IT Desk checklist for Microsoft Teams Employee Service. Useful when enabling Swarming and agent ticketing workflows in Teams. CX Codex +1 1,200installs service-itsm-teams-employee-agent-configure forcedotcom service-itsm-teams-employee-agent-configure configures embedded Agentforce Employee Agent to reply inside Microsoft Teams ITSM without Setup UI clicks. Needed when the agent leaves the chat or ignores messages. CX Codex +1 1,200installs

From the same set67

The whole set →

Project sponsors

Companies that keep this analytics open