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
npx skills add AceDataCloud/Skills --skill microsoft-teams -a claude-codeWhat 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_IDand summarize them without markup - Send a message to
CHAT_IDsaying the call moved to 15:00
How to install microsoft-teams
1Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill microsoft-teams -a claude-code2Manually: put the files in place
~/.claude/skills/microsoft-teams/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/microsoft-teams/
1Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill microsoft-teams -a codex2Manually: put the files in place
.agents/skills/microsoft-teams/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill microsoft-teams -a cursor2Manually: put the files in place
.cursor/skills/microsoft-teams/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install AceDataCloud/Skills skills/microsoft-teams2Manually: put the files in place
.github/skills/microsoft-teams/SKILL.md1Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill microsoft-teams -a gemini-cli2Platform CLI
gemini skills install https://github.com/AceDataCloud/Skills --path skills/microsoft-teamsManually: put the files in place
.devin/skills/microsoft-teams/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill microsoft-teams -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.