Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions skills/m365-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ Use `m365 <service> <action> --help` for detailed parameter info on any listed a
| `add-chat-member` | **chatId**, **userId** (required) | Add a member to a chat |
| `list-chat-messages-all` | **chatId**, **range** (required, e.g. 2h/7d/30m) | Fetch all messages in a chat within a time range (handles pagination automatically) |
| `get-chat-message` | **chatId**, **messageId** (required) | Get a specific chat message |
| `post-message` | **chatId**, **content** (required) | Send a message to a chat |
| `post-message` | **chatId**, **content** (required), contentType, mentions, importance, adaptiveCardJson | Send a message to a chat (supports @mentions, HTML, Adaptive Cards) |
| `update-chat-message` | **chatId**, **messageId**, **content** (required) | Update a chat message |
| `send-message-to-self` | **content** (required), contentType | Send a message to yourself |
| `send-message-to-self` | **content** (required), contentType, mentions, importance, adaptiveCardJson | Send a message to yourself |
| `search-teams-messages` | **message** (required), conversationId | Natural language search across Teams messages |

`list-chat-messages` remains functional for compatibility but is intentionally hidden from help/docs. Prefer `list-chat-messages-all`.
Expand Down Expand Up @@ -257,6 +257,22 @@ m365 fav get alex --json
m365 teams post-message chatId="<chat_id-from-fav>" content="Hey!" --json
```

#### Send a message with @mentions
```bash
# mentions is a JSON array: each entry has displayName, id (user GUID), and type (user|team|channel|app)
# In content, write @DisplayName where you want the mention — the server auto-replaces it with Teams mention markup
m365 teams post-message \
chatId="19:xxx@thread.v2" \
content="Hey @Sarah please review this" \
mentions='[{"displayName":"Sarah","id":"a62b9438-73dc-4583-848f-d894035eb0c8","type":"user"}]' --json

# Multiple mentions
m365 teams post-message \
chatId="19:xxx@thread.v2" \
content="@Alice and @Bob can you take a look?" \
mentions='[{"displayName":"Alice","id":"<alice-guid>","type":"user"},{"displayName":"Bob","id":"<bob-guid>","type":"user"}]' --json
```

#### Read messages from a favorite chat
```bash
m365 fav get project-alpha --json
Expand Down