msteams-mcp 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of msteams-mcp might be problematic. Click here for more details.
- package/LICENSE +21 -0
- package/README.md +261 -0
- package/dist/__fixtures__/api-responses.d.ts +254 -0
- package/dist/__fixtures__/api-responses.js +245 -0
- package/dist/api/calendar-api.d.ts +66 -0
- package/dist/api/calendar-api.js +179 -0
- package/dist/api/chatsvc-api.d.ts +352 -0
- package/dist/api/chatsvc-api.js +1100 -0
- package/dist/api/csa-api.d.ts +64 -0
- package/dist/api/csa-api.js +200 -0
- package/dist/api/index.d.ts +7 -0
- package/dist/api/index.js +7 -0
- package/dist/api/substrate-api.d.ts +50 -0
- package/dist/api/substrate-api.js +305 -0
- package/dist/auth/crypto.d.ts +32 -0
- package/dist/auth/crypto.js +66 -0
- package/dist/auth/index.d.ts +7 -0
- package/dist/auth/index.js +7 -0
- package/dist/auth/session-store.d.ts +87 -0
- package/dist/auth/session-store.js +230 -0
- package/dist/auth/token-extractor.d.ts +185 -0
- package/dist/auth/token-extractor.js +674 -0
- package/dist/auth/token-refresh.d.ts +25 -0
- package/dist/auth/token-refresh.js +85 -0
- package/dist/browser/auth.d.ts +53 -0
- package/dist/browser/auth.js +603 -0
- package/dist/browser/context.d.ts +40 -0
- package/dist/browser/context.js +122 -0
- package/dist/constants.d.ts +104 -0
- package/dist/constants.js +195 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +12 -0
- package/dist/research/auth-research.d.ts +10 -0
- package/dist/research/auth-research.js +175 -0
- package/dist/research/explore.d.ts +11 -0
- package/dist/research/explore.js +270 -0
- package/dist/research/search-research.d.ts +17 -0
- package/dist/research/search-research.js +317 -0
- package/dist/server.d.ts +66 -0
- package/dist/server.js +295 -0
- package/dist/test/debug-search.d.ts +10 -0
- package/dist/test/debug-search.js +147 -0
- package/dist/test/mcp-harness.d.ts +17 -0
- package/dist/test/mcp-harness.js +474 -0
- package/dist/tools/auth-tools.d.ts +26 -0
- package/dist/tools/auth-tools.js +191 -0
- package/dist/tools/index.d.ts +56 -0
- package/dist/tools/index.js +34 -0
- package/dist/tools/meeting-tools.d.ts +33 -0
- package/dist/tools/meeting-tools.js +64 -0
- package/dist/tools/message-tools.d.ts +269 -0
- package/dist/tools/message-tools.js +856 -0
- package/dist/tools/people-tools.d.ts +46 -0
- package/dist/tools/people-tools.js +112 -0
- package/dist/tools/registry.d.ts +23 -0
- package/dist/tools/registry.js +63 -0
- package/dist/tools/search-tools.d.ts +91 -0
- package/dist/tools/search-tools.js +222 -0
- package/dist/types/errors.d.ts +58 -0
- package/dist/types/errors.js +132 -0
- package/dist/types/result.d.ts +43 -0
- package/dist/types/result.js +51 -0
- package/dist/types/server.d.ts +27 -0
- package/dist/types/server.js +7 -0
- package/dist/types/teams.d.ts +85 -0
- package/dist/types/teams.js +4 -0
- package/dist/utils/api-config.d.ts +103 -0
- package/dist/utils/api-config.js +158 -0
- package/dist/utils/auth-guards.d.ts +67 -0
- package/dist/utils/auth-guards.js +147 -0
- package/dist/utils/http.d.ts +29 -0
- package/dist/utils/http.js +112 -0
- package/dist/utils/parsers.d.ts +247 -0
- package/dist/utils/parsers.js +731 -0
- package/dist/utils/parsers.test.d.ts +7 -0
- package/dist/utils/parsers.test.js +511 -0
- package/package.json +62 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rob MacDonald
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
# Teams MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://github.com/m0nkmaster/msteams-mcp/actions/workflows/ci.yml)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
|
|
7
|
+
An MCP (Model Context Protocol) server that enables AI assistants to interact with Microsoft Teams. Search messages, send replies, manage favourites, and more.
|
|
8
|
+
|
|
9
|
+
## How It Works
|
|
10
|
+
|
|
11
|
+
This server calls Microsoft's Teams APIs directly (Substrate, chatsvc, CSA) - the same APIs the Teams web app uses. No Azure AD app registration or admin consent required.
|
|
12
|
+
|
|
13
|
+
**Authentication flow:**
|
|
14
|
+
1. AI runs `teams_login` to open a browser for you to log in
|
|
15
|
+
2. OAuth tokens are extracted and cached
|
|
16
|
+
3. All operations use cached tokens directly (no browser needed)
|
|
17
|
+
4. Automatic token refresh (~1 hour)
|
|
18
|
+
|
|
19
|
+
**Security:** Uses the same authentication as the Teams web client - your access is limited to what your account can already do.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
### Prerequisites
|
|
24
|
+
|
|
25
|
+
- Node.js 18+
|
|
26
|
+
- A Microsoft account with Teams access
|
|
27
|
+
- Google Chrome, Microsoft Edge, or Chromium browser installed
|
|
28
|
+
|
|
29
|
+
### Setup
|
|
30
|
+
|
|
31
|
+
Clone and build:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
git clone https://github.com/m0nkmaster/msteams-mcp.git
|
|
35
|
+
cd teams-mcp-server
|
|
36
|
+
npm install && npm run build
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Configure Your MCP Client
|
|
40
|
+
|
|
41
|
+
Add to your MCP client configuration (e.g., Claude Desktop, Cursor):
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"mcpServers": {
|
|
46
|
+
"teams": {
|
|
47
|
+
"command": "/path/to/teams-mcp-server/bin/run.sh"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Replace `/path/to/teams-mcp-server` with the actual path where you cloned the repo.
|
|
54
|
+
|
|
55
|
+
The `run.sh` script checks for updates on startup:
|
|
56
|
+
- If remote has new commits, pulls and rebuilds (~5-10s)
|
|
57
|
+
- If already up-to-date, starts immediately (~200ms overhead)
|
|
58
|
+
- If offline, runs the existing build
|
|
59
|
+
|
|
60
|
+
**Windows users:** Use Git Bash or WSL to run the script, or run directly with `node /path/to/teams-mcp-server/dist/index.js` (manual updates with `git pull && npm install && npm run build`).
|
|
61
|
+
|
|
62
|
+
The server uses your system's Chrome (macOS/Linux) or Edge (Windows) for authentication.
|
|
63
|
+
|
|
64
|
+
## Available Tools
|
|
65
|
+
|
|
66
|
+
### Search & Discovery
|
|
67
|
+
|
|
68
|
+
| Tool | Description |
|
|
69
|
+
|------|-------------|
|
|
70
|
+
| `teams_search` | Search messages with operators (`from:`, `sent:`, `in:`, `hasattachment:`, etc.) |
|
|
71
|
+
| `teams_get_thread` | Get messages from a conversation/thread |
|
|
72
|
+
| `teams_find_channel` | Find channels by name (your teams + org-wide discovery) |
|
|
73
|
+
| `teams_get_activity` | Get activity feed (mentions, reactions, replies, notifications) |
|
|
74
|
+
|
|
75
|
+
### Messaging
|
|
76
|
+
|
|
77
|
+
| Tool | Description |
|
|
78
|
+
|------|-------------|
|
|
79
|
+
| `teams_send_message` | Send a message (default: self-chat/notes). Use `replyToMessageId` for thread replies |
|
|
80
|
+
| `teams_edit_message` | Edit one of your own messages |
|
|
81
|
+
| `teams_delete_message` | Delete one of your own messages (soft delete) |
|
|
82
|
+
|
|
83
|
+
### People & Contacts
|
|
84
|
+
|
|
85
|
+
| Tool | Description |
|
|
86
|
+
|------|-------------|
|
|
87
|
+
| `teams_get_me` | Get current user profile (email, name, ID) |
|
|
88
|
+
| `teams_search_people` | Search for people by name or email |
|
|
89
|
+
| `teams_get_frequent_contacts` | Get frequently contacted people (useful for name resolution) |
|
|
90
|
+
| `teams_get_chat` | Get conversation ID for 1:1 chat with a person |
|
|
91
|
+
| `teams_create_group_chat` | Create a new group chat with multiple people (2+ others) |
|
|
92
|
+
|
|
93
|
+
### Organisation
|
|
94
|
+
|
|
95
|
+
| Tool | Description |
|
|
96
|
+
|------|-------------|
|
|
97
|
+
| `teams_get_favorites` | Get pinned/favourite conversations |
|
|
98
|
+
| `teams_add_favorite` | Pin a conversation |
|
|
99
|
+
| `teams_remove_favorite` | Unpin a conversation |
|
|
100
|
+
| `teams_save_message` | Bookmark a message |
|
|
101
|
+
| `teams_unsave_message` | Remove bookmark from a message |
|
|
102
|
+
| `teams_get_saved_messages` | Get list of saved/bookmarked messages with source references |
|
|
103
|
+
| `teams_get_followed_threads` | Get list of followed threads with source references |
|
|
104
|
+
| `teams_get_unread` | Get unread counts (aggregate or per-conversation) |
|
|
105
|
+
| `teams_mark_read` | Mark a conversation as read up to a message |
|
|
106
|
+
|
|
107
|
+
### Reactions
|
|
108
|
+
|
|
109
|
+
| Tool | Description |
|
|
110
|
+
|------|-------------|
|
|
111
|
+
| `teams_search_emoji` | Search for emojis by name (standard + custom org emojis) |
|
|
112
|
+
| `teams_add_reaction` | Add an emoji reaction to a message |
|
|
113
|
+
| `teams_remove_reaction` | Remove an emoji reaction from a message |
|
|
114
|
+
|
|
115
|
+
**Quick reactions:** `like`, `heart`, `laugh`, `surprised`, `sad`, `angry` can be used directly without searching.
|
|
116
|
+
|
|
117
|
+
### Calendar
|
|
118
|
+
|
|
119
|
+
| Tool | Description |
|
|
120
|
+
|------|-------------|
|
|
121
|
+
| `teams_get_meetings` | Get meetings from calendar (defaults to next 7 days) |
|
|
122
|
+
|
|
123
|
+
Returns: subject, times, organiser, join URL, `threadId` for meeting chat. Use with `teams_get_thread` to read meeting discussions.
|
|
124
|
+
|
|
125
|
+
### Session
|
|
126
|
+
|
|
127
|
+
| Tool | Description |
|
|
128
|
+
|------|-------------|
|
|
129
|
+
| `teams_login` | Trigger manual login (opens browser) |
|
|
130
|
+
| `teams_status` | Check authentication and session state |
|
|
131
|
+
|
|
132
|
+
### Search Operators
|
|
133
|
+
|
|
134
|
+
The search supports Teams' native operators:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
from:sarah@company.com # Messages from person
|
|
138
|
+
sent:2026-01-20 # Messages from specific date
|
|
139
|
+
sent:>=2026-01-15 # Messages since date
|
|
140
|
+
in:project-alpha # Messages in channel
|
|
141
|
+
"Rob Smith" # Find @mentions (name in quotes)
|
|
142
|
+
hasattachment:true # Messages with files
|
|
143
|
+
NOT from:email@co.com # Exclude results
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Combine operators: `from:sarah@co.com sent:>=2026-01-18 hasattachment:true`
|
|
147
|
+
|
|
148
|
+
**Note:** `@me`, `from:me`, `to:me` do NOT work. Use `teams_get_me` first to get your email/displayName. `sent:today` works, but `sent:lastweek` and `sent:thisweek` do NOT - use explicit dates or omit (results are sorted by recency).
|
|
149
|
+
|
|
150
|
+
## MCP Resources
|
|
151
|
+
|
|
152
|
+
The server also exposes passive resources for context discovery:
|
|
153
|
+
|
|
154
|
+
| Resource URI | Description |
|
|
155
|
+
|--------------|-------------|
|
|
156
|
+
| `teams://me/profile` | Current user's profile |
|
|
157
|
+
| `teams://me/favorites` | Pinned conversations |
|
|
158
|
+
| `teams://status` | Authentication status |
|
|
159
|
+
|
|
160
|
+
## CLI Tools (Development)
|
|
161
|
+
|
|
162
|
+
For local development, CLI tools are available for testing and debugging:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Check authentication status
|
|
166
|
+
npm run cli -- status
|
|
167
|
+
|
|
168
|
+
# Search messages
|
|
169
|
+
npm run cli -- search "meeting notes"
|
|
170
|
+
npm run cli -- search "project" --from 0 --size 50
|
|
171
|
+
|
|
172
|
+
# Send messages (default: your own notes/self-chat)
|
|
173
|
+
npm run cli -- send "Hello from Teams MCP!"
|
|
174
|
+
npm run cli -- send "Message" --to "conversation-id"
|
|
175
|
+
|
|
176
|
+
# Force login
|
|
177
|
+
npm run cli -- login --force
|
|
178
|
+
|
|
179
|
+
# Output as JSON
|
|
180
|
+
npm run cli -- search "query" --json
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### MCP Test Harness
|
|
184
|
+
|
|
185
|
+
Test the server through the actual MCP protocol:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# List available tools
|
|
189
|
+
npm run test:mcp
|
|
190
|
+
|
|
191
|
+
# Call any tool
|
|
192
|
+
npm run test:mcp -- search "your query"
|
|
193
|
+
npm run test:mcp -- status
|
|
194
|
+
npm run test:mcp -- people "john smith"
|
|
195
|
+
npm run test:mcp -- favorites
|
|
196
|
+
npm run test:mcp -- activity # Get activity feed
|
|
197
|
+
npm run test:mcp -- unread # Check unread counts
|
|
198
|
+
npm run test:mcp -- teams_search_emoji --query "heart" # Search emojis
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Limitations
|
|
202
|
+
|
|
203
|
+
- **Login required** - Run `teams_login` to authenticate (opens browser)
|
|
204
|
+
- **Token expiry** - Tokens expire after ~1 hour; headless refresh is attempted or run `teams_login` again when needed
|
|
205
|
+
- **Undocumented APIs** - Uses Microsoft's internal APIs which may change without notice
|
|
206
|
+
- **Search limitations** - Full-text search only; thread replies not matching search terms won't appear (use `teams_get_thread` for full context)
|
|
207
|
+
- **Own messages only** - Edit/delete only works on your own messages
|
|
208
|
+
|
|
209
|
+
## Session Files
|
|
210
|
+
|
|
211
|
+
Session files are stored in a user config directory (encrypted):
|
|
212
|
+
|
|
213
|
+
- **macOS/Linux**: `~/.teams-mcp-server/`
|
|
214
|
+
- **Windows**: `%APPDATA%\teams-mcp-server\`
|
|
215
|
+
|
|
216
|
+
Contents: `session-state.json`, `token-cache.json`, `.user-data/`
|
|
217
|
+
|
|
218
|
+
If your session expires, call `teams_login` or delete the config directory.
|
|
219
|
+
|
|
220
|
+
## Development
|
|
221
|
+
|
|
222
|
+
For local development:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
git clone https://github.com/m0nkmaster/msteams-mcp.git
|
|
226
|
+
cd microsoft-teams-mcp
|
|
227
|
+
npm install
|
|
228
|
+
npm run build
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Development commands:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
npm run dev # Run MCP server in dev mode
|
|
235
|
+
npm run build # Compile TypeScript
|
|
236
|
+
npm run lint # Run ESLint
|
|
237
|
+
npm run research # Explore Teams APIs (logs network calls)
|
|
238
|
+
npm test # Run unit tests
|
|
239
|
+
npm run typecheck # TypeScript type checking
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
For development with hot reload, configure your MCP client:
|
|
243
|
+
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"mcpServers": {
|
|
247
|
+
"teams": {
|
|
248
|
+
"command": "npx",
|
|
249
|
+
"args": ["tsx", "/path/to/microsoft-teams-mcp/src/index.ts"]
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
See [AGENTS.md](AGENTS.md) for detailed architecture and contribution guidelines.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Teams Chat Export Bookmarklet
|
|
260
|
+
|
|
261
|
+
This repo also includes a standalone bookmarklet for exporting Teams chat messages to Markdown. See [teams-bookmarklet/README.md](teams-bookmarklet/README.md).
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API response fixtures for testing.
|
|
3
|
+
*
|
|
4
|
+
* These are based on real API response structures documented in docs/API-REFERENCE.md.
|
|
5
|
+
* They represent the shape of data returned by Teams/Substrate APIs.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Substrate v2 search result item.
|
|
9
|
+
* From: POST https://substrate.office.com/searchservice/api/v2/query
|
|
10
|
+
*/
|
|
11
|
+
export declare const searchResultItem: {
|
|
12
|
+
Id: string;
|
|
13
|
+
ReferenceId: string;
|
|
14
|
+
HitHighlightedSummary: string;
|
|
15
|
+
Summary: string;
|
|
16
|
+
Source: {
|
|
17
|
+
DateTimeReceived: string;
|
|
18
|
+
From: {
|
|
19
|
+
EmailAddress: {
|
|
20
|
+
Name: string;
|
|
21
|
+
Address: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
ChannelName: string;
|
|
25
|
+
TeamName: string;
|
|
26
|
+
Extensions: {
|
|
27
|
+
SkypeSpaces_ConversationPost_Extension_SkypeGroupId: string;
|
|
28
|
+
};
|
|
29
|
+
ClientConversationId: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Search result with HTML content that needs stripping.
|
|
34
|
+
*/
|
|
35
|
+
export declare const searchResultWithHtml: {
|
|
36
|
+
Id: string;
|
|
37
|
+
ReferenceId: string;
|
|
38
|
+
HitHighlightedSummary: string;
|
|
39
|
+
Source: {
|
|
40
|
+
DateTimeReceived: string;
|
|
41
|
+
From: string;
|
|
42
|
+
ClientThreadId: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Minimal search result with only required fields.
|
|
47
|
+
*/
|
|
48
|
+
export declare const searchResultMinimal: {
|
|
49
|
+
Id: string;
|
|
50
|
+
HitHighlightedSummary: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Search result too short to be valid (content < 5 chars).
|
|
54
|
+
*/
|
|
55
|
+
export declare const searchResultTooShort: {
|
|
56
|
+
Id: string;
|
|
57
|
+
HitHighlightedSummary: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Full EntitySets response structure from v2 query.
|
|
61
|
+
*/
|
|
62
|
+
export declare const searchEntitySetsResponse: {
|
|
63
|
+
EntitySets: {
|
|
64
|
+
ResultSets: {
|
|
65
|
+
Total: number;
|
|
66
|
+
Results: ({
|
|
67
|
+
Id: string;
|
|
68
|
+
ReferenceId: string;
|
|
69
|
+
HitHighlightedSummary: string;
|
|
70
|
+
Summary: string;
|
|
71
|
+
Source: {
|
|
72
|
+
DateTimeReceived: string;
|
|
73
|
+
From: {
|
|
74
|
+
EmailAddress: {
|
|
75
|
+
Name: string;
|
|
76
|
+
Address: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
ChannelName: string;
|
|
80
|
+
TeamName: string;
|
|
81
|
+
Extensions: {
|
|
82
|
+
SkypeSpaces_ConversationPost_Extension_SkypeGroupId: string;
|
|
83
|
+
};
|
|
84
|
+
ClientConversationId: string;
|
|
85
|
+
};
|
|
86
|
+
} | {
|
|
87
|
+
Id: string;
|
|
88
|
+
ReferenceId: string;
|
|
89
|
+
HitHighlightedSummary: string;
|
|
90
|
+
Source: {
|
|
91
|
+
DateTimeReceived: string;
|
|
92
|
+
From: string;
|
|
93
|
+
ClientThreadId: string;
|
|
94
|
+
};
|
|
95
|
+
})[];
|
|
96
|
+
}[];
|
|
97
|
+
}[];
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Person suggestion from Substrate suggestions API.
|
|
101
|
+
* From: POST https://substrate.office.com/search/api/v1/suggestions
|
|
102
|
+
*/
|
|
103
|
+
export declare const personSuggestion: {
|
|
104
|
+
Id: string;
|
|
105
|
+
MRI: string;
|
|
106
|
+
DisplayName: string;
|
|
107
|
+
GivenName: string;
|
|
108
|
+
Surname: string;
|
|
109
|
+
EmailAddresses: string[];
|
|
110
|
+
CompanyName: string;
|
|
111
|
+
Department: string;
|
|
112
|
+
JobTitle: string;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Person with minimal info using a proper GUID (no optional fields).
|
|
116
|
+
*/
|
|
117
|
+
export declare const personMinimal: {
|
|
118
|
+
Id: string;
|
|
119
|
+
DisplayName: string;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Person with base64-encoded GUID (real-world API response format).
|
|
123
|
+
* The base64 '93qkaTtFGWpUHjyRafgdhg==' decodes to GUID '69a47af7-453b-6a19-541e-3c9169f81d86'.
|
|
124
|
+
*/
|
|
125
|
+
export declare const personWithBase64Id: {
|
|
126
|
+
Id: string;
|
|
127
|
+
MRI: string;
|
|
128
|
+
DisplayName: string;
|
|
129
|
+
EmailAddresses: string[];
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Groups response from suggestions API.
|
|
133
|
+
*/
|
|
134
|
+
export declare const peopleGroupsResponse: {
|
|
135
|
+
Groups: {
|
|
136
|
+
Suggestions: {
|
|
137
|
+
Id: string;
|
|
138
|
+
DisplayName: string;
|
|
139
|
+
}[];
|
|
140
|
+
}[];
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* JWT payload with full user info.
|
|
144
|
+
*/
|
|
145
|
+
export declare const jwtPayloadFull: {
|
|
146
|
+
oid: string;
|
|
147
|
+
name: string;
|
|
148
|
+
upn: string;
|
|
149
|
+
preferred_username: string;
|
|
150
|
+
email: string;
|
|
151
|
+
given_name: string;
|
|
152
|
+
family_name: string;
|
|
153
|
+
tid: string;
|
|
154
|
+
exp: number;
|
|
155
|
+
iat: number;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* JWT payload with minimal info (only required fields).
|
|
159
|
+
*/
|
|
160
|
+
export declare const jwtPayloadMinimal: {
|
|
161
|
+
oid: string;
|
|
162
|
+
name: string;
|
|
163
|
+
exp: number;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* JWT payload for name parsing tests - "Surname, GivenName" format.
|
|
167
|
+
*/
|
|
168
|
+
export declare const jwtPayloadCommaName: {
|
|
169
|
+
oid: string;
|
|
170
|
+
name: string;
|
|
171
|
+
upn: string;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* JWT payload for name parsing tests - "GivenName Surname" format.
|
|
175
|
+
*/
|
|
176
|
+
export declare const jwtPayloadSpaceName: {
|
|
177
|
+
oid: string;
|
|
178
|
+
name: string;
|
|
179
|
+
upn: string;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Channel thread reply - messageid differs from message timestamp.
|
|
183
|
+
* The parent post was at 1768919400000 (2026-01-20T14:30:00.000Z),
|
|
184
|
+
* this reply is at 1768921200000 (2026-01-20T15:00:00.000Z).
|
|
185
|
+
*/
|
|
186
|
+
export declare const searchResultThreadReply: {
|
|
187
|
+
Id: string;
|
|
188
|
+
ReferenceId: string;
|
|
189
|
+
HitHighlightedSummary: string;
|
|
190
|
+
Source: {
|
|
191
|
+
DateTimeReceived: string;
|
|
192
|
+
From: {
|
|
193
|
+
EmailAddress: {
|
|
194
|
+
Name: string;
|
|
195
|
+
Address: string;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
ChannelName: string;
|
|
199
|
+
TeamName: string;
|
|
200
|
+
Extensions: {
|
|
201
|
+
SkypeSpaces_ConversationPost_Extension_SkypeGroupId: string;
|
|
202
|
+
};
|
|
203
|
+
ClientConversationId: string;
|
|
204
|
+
ClientThreadId: string;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Message source with explicit message ID.
|
|
209
|
+
*/
|
|
210
|
+
export declare const sourceWithMessageId: {
|
|
211
|
+
MessageId: string;
|
|
212
|
+
DateTimeReceived: string;
|
|
213
|
+
ClientConversationId: string;
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* Message source with ID in ClientConversationId.
|
|
217
|
+
*/
|
|
218
|
+
export declare const sourceWithConvIdMessageId: {
|
|
219
|
+
DateTimeReceived: string;
|
|
220
|
+
ClientConversationId: string;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Thread message from chatsvc API.
|
|
224
|
+
* From: GET /api/chatsvc/{region}/v1/users/ME/conversations/{id}/messages
|
|
225
|
+
*/
|
|
226
|
+
export declare const threadMessage: {
|
|
227
|
+
id: string;
|
|
228
|
+
content: string;
|
|
229
|
+
messagetype: string;
|
|
230
|
+
contenttype: string;
|
|
231
|
+
from: string;
|
|
232
|
+
imdisplayname: string;
|
|
233
|
+
originalarrivaltime: string;
|
|
234
|
+
composetime: string;
|
|
235
|
+
clientmessageid: string;
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Favorites folder response.
|
|
239
|
+
* From: POST /api/csa/{region}/api/v1/teams/users/me/conversationFolders
|
|
240
|
+
*/
|
|
241
|
+
export declare const favoritesFolderResponse: {
|
|
242
|
+
folderHierarchyVersion: number;
|
|
243
|
+
conversationFolders: {
|
|
244
|
+
id: string;
|
|
245
|
+
sortType: string;
|
|
246
|
+
name: string;
|
|
247
|
+
folderType: string;
|
|
248
|
+
conversationFolderItems: {
|
|
249
|
+
conversationId: string;
|
|
250
|
+
createdTime: number;
|
|
251
|
+
lastUpdatedTime: number;
|
|
252
|
+
}[];
|
|
253
|
+
}[];
|
|
254
|
+
};
|