@softeria/ms-365-mcp-server 0.181.0 → 0.181.2

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.
package/.dockerignore CHANGED
@@ -13,3 +13,4 @@ coverage
13
13
  .token-cache.json
14
14
  .selected-account.json
15
15
  .mcp.json
16
+ .remember
package/Dockerfile CHANGED
@@ -20,4 +20,10 @@ RUN npm ci --ignore-scripts --omit=dev
20
20
 
21
21
  COPY --from=builder /app/dist /app/dist
22
22
 
23
+ # The process holds tenant-scoped Graph credentials, so it runs as the unprivileged
24
+ # `node` user. /app is handed to it because the server may write runtime state
25
+ # (the token cache, the selected account) to the working directory.
26
+ RUN chown -R node:node /app
27
+ USER node
28
+
23
29
  ENTRYPOINT ["node", "dist/index.js"]
package/PRESETS.md CHANGED
@@ -10,14 +10,14 @@ Every preset also includes the account tools (`login`, `logout`, `verify-login`,
10
10
 
11
11
  | Preset | Mode | Tools | Scopes | Org mode | Description |
12
12
  | ------------- | ---------------------------------------------------------------- | ---------: | -------: | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
13
- | `all` | [full](#all-full)<br>[read only](#all-read-only) | 370<br>180 | 63<br>37 | -<br>- | All available tools |
13
+ | `all` | [full](#all-full)<br>[read only](#all-read-only) | 370<br>180 | 65<br>38 | -<br>- | All available tools |
14
14
  | `calendar` | [full](#calendar-full)<br>[read only](#calendar-read-only) | 47<br>22 | 7<br>5 | -<br>- | Calendar and event management |
15
15
  | `contacts` | [full](#contacts-full)<br>[read only](#contacts-read-only) | 15<br>7 | 1<br>1 | -<br>- | Outlook contacts management |
16
16
  | `excel` | [full](#excel-full)<br>[read only](#excel-read-only) | 25<br>9 | 1<br>1 | -<br>- | Excel spreadsheet operations |
17
17
  | `files` | [full](#files-full)<br>[read only](#files-read-only) | 25<br>14 | 3<br>2 | -<br>- | OneDrive file and folder operations |
18
18
  | `mail` | [full](#mail-full)<br>[read only](#mail-read-only) | 50<br>19 | 5<br>3 | -<br>- | Email operations (read, send, manage folders, attachments) |
19
19
  | `onedrive` | [full](#onedrive-full)<br>[read only](#onedrive-read-only) | 23<br>12 | 2<br>1 | -<br>- | OneDrive app only: drive and file operations, excluding Excel |
20
- | `onenote` | [full](#onenote-full)<br>[read only](#onenote-read-only) | 29<br>17 | 3<br>1 | -<br>- | OneNote notebook operations |
20
+ | `onenote` | [full](#onenote-full)<br>[read only](#onenote-read-only) | 29<br>17 | 5<br>2 | -<br>- | OneNote notebook operations |
21
21
  | `outlook` | [full](#outlook-full)<br>[read only](#outlook-read-only) | 97<br>37 | 8<br>6 | -<br>- | Outlook app only: mail, calendar and contacts |
22
22
  | `personal` | [full](#personal-full)<br>[read only](#personal-read-only) | 178<br>74 | 20<br>15 | -<br>- | Personal productivity tools (mail, calendar, files, contacts, tasks, notes, search) |
23
23
  | `search` | [full](#search-full)<br>[read only](#search-read-only) | 7<br>7 | 8<br>8 | -<br>- | Microsoft Search capabilities |
@@ -25,7 +25,7 @@ Every preset also includes the account tools (`login`, `logout`, `verify-login`,
25
25
  | `teams` | [full](#teams-full)<br>[read only](#teams-read-only) | 73<br>43 | 31<br>18 | required<br>required | Teams app only: chats, channels, meetings and presence |
26
26
  | `teams-write` | [full](#teams-write-full)<br>[read only](#teams-write-read-only) | 11<br>7 | 6<br>3 | required<br>required | Teams send-only: send/reply in chats and channels, list chats/teams/channels by name, activity notifications - no message reading |
27
27
  | `users` | [full](#users-full)<br>[read only](#users-read-only) | 11<br>11 | 4<br>4 | required<br>required | User directory access |
28
- | `work` | [full](#work-full)<br>[read only](#work-read-only) | 190<br>110 | 56<br>33 | required<br>required | Organization/work tools (Teams, SharePoint, shared mailboxes, search) |
28
+ | `work` | [full](#work-full)<br>[read only](#work-read-only) | 190<br>110 | 55<br>33 | required<br>required | Organization/work tools (Teams, SharePoint, shared mailboxes, search) |
29
29
 
30
30
  ## `all` full
31
31
 
@@ -404,7 +404,7 @@ Tools (370):
404
404
  - `upload-file-content`
405
405
  - `upload-my-profile-photo`
406
406
 
407
- Scopes (63):
407
+ Scopes (65):
408
408
 
409
409
  - `Calendars.Read.Shared`
410
410
  - `Calendars.ReadWrite`
@@ -439,7 +439,9 @@ Scopes (63):
439
439
  - `MailboxSettings.ReadWrite`
440
440
  - `Notes.Create`
441
441
  - `Notes.Read`
442
+ - `Notes.Read.All`
442
443
  - `Notes.ReadWrite`
444
+ - `Notes.ReadWrite.All`
443
445
  - `OnlineMeetingArtifact.Read.All`
444
446
  - `OnlineMeetingRecording.Read.All`
445
447
  - `OnlineMeetings.Read`
@@ -657,7 +659,7 @@ Tools (180):
657
659
  - `search-query`
658
660
  - `search-sharepoint-sites`
659
661
 
660
- Scopes (37):
662
+ Scopes (38):
661
663
 
662
664
  - `Calendars.Read`
663
665
  - `Calendars.Read.Shared`
@@ -677,6 +679,7 @@ Scopes (37):
677
679
  - `Mail.Read.Shared`
678
680
  - `MailboxSettings.Read`
679
681
  - `Notes.Read`
682
+ - `Notes.Read.All`
680
683
  - `OnlineMeetingArtifact.Read.All`
681
684
  - `OnlineMeetingRecording.Read.All`
682
685
  - `OnlineMeetings.Read`
@@ -1153,11 +1156,13 @@ Tools (29):
1153
1156
  - `update-onenote-page-content`
1154
1157
  - `update-sharepoint-site-onenote-page-content`
1155
1158
 
1156
- Scopes (3):
1159
+ Scopes (5):
1157
1160
 
1158
1161
  - `Notes.Create`
1159
1162
  - `Notes.Read`
1163
+ - `Notes.Read.All`
1160
1164
  - `Notes.ReadWrite`
1165
+ - `Notes.ReadWrite.All`
1161
1166
 
1162
1167
  ## `onenote` read only
1163
1168
 
@@ -1183,9 +1188,10 @@ Tools (17):
1183
1188
  - `list-sharepoint-site-onenote-section-group-sections`
1184
1189
  - `list-sharepoint-site-onenote-section-pages`
1185
1190
 
1186
- Scopes (1):
1191
+ Scopes (2):
1187
1192
 
1188
1193
  - `Notes.Read`
1194
+ - `Notes.Read.All`
1189
1195
 
1190
1196
  ## `outlook` full
1191
1197
 
@@ -2278,7 +2284,7 @@ Tools (190):
2278
2284
  - `update-team-channel`
2279
2285
  - `upload-attachment-from-file`
2280
2286
 
2281
- Scopes (56):
2287
+ Scopes (55):
2282
2288
 
2283
2289
  - `Calendars.Read`
2284
2290
  - `Calendars.Read.Shared`
@@ -2306,9 +2312,8 @@ Scopes (56):
2306
2312
  - `Mail.Read.Shared`
2307
2313
  - `Mail.ReadWrite.Shared`
2308
2314
  - `Mail.Send.Shared`
2309
- - `Notes.Create`
2310
- - `Notes.Read`
2311
- - `Notes.ReadWrite`
2315
+ - `Notes.Read.All`
2316
+ - `Notes.ReadWrite.All`
2312
2317
  - `OnlineMeetingArtifact.Read.All`
2313
2318
  - `OnlineMeetingRecording.Read.All`
2314
2319
  - `OnlineMeetings.Read`
@@ -2472,7 +2477,7 @@ Scopes (33):
2472
2477
  - `GroupMember.Read.All`
2473
2478
  - `Mail.Read`
2474
2479
  - `Mail.Read.Shared`
2475
- - `Notes.Read`
2480
+ - `Notes.Read.All`
2476
2481
  - `OnlineMeetingArtifact.Read.All`
2477
2482
  - `OnlineMeetingRecording.Read.All`
2478
2483
  - `OnlineMeetings.Read`
package/README.md CHANGED
@@ -1058,8 +1058,8 @@ per-request.
1058
1058
 
1059
1059
  The signing key is optional. Without one, minted URLs are just `/attachment?t=<ticket>` and
1060
1060
  any HTTP client can fetch them; the ticket alone authorises redemption. Set a key only if
1061
- the fetcher verifies the `dgk`/`dgx`/`dgs` signature (see below), such as a docglean-mcp
1062
- sidecar, which will refuse an unsigned URL. Setting `_KEY_ID` without a key, or a `_KEY_FILE` that is
1061
+ the fetcher verifies the `dgk`/`dgx`/`dgs` signature (see below) and will refuse an
1062
+ unsigned URL. Setting `_KEY_ID` without a key, or a `_KEY_FILE` that is
1063
1063
  empty or unreadable, fails at startup.
1064
1064
 
1065
1065
  ### Splitting the attachment listener
@@ -1130,7 +1130,7 @@ services:
1130
1130
  --http 10.89.0.2:3000 --trust-proxy-auth
1131
1131
  --enable-attachment-urls
1132
1132
  --attachment-port 3001 --attachment-host 10.89.1.2
1133
- docglean:
1133
+ converter:
1134
1134
  networks: [convert-net]
1135
1135
  ```
1136
1136
 
@@ -1165,15 +1165,13 @@ What authorises redemption _here_ is the ticket. Verifying the signature on the
1165
1165
  would prove only that we minted the URL — which the ticket already proves — while coupling
1166
1166
  redemption to the sidecar's clock and to the key surviving a restart.
1167
1167
 
1168
- The wire format is [docglean-mcp](https://github.com/msoukhomlinov/docglean-mcp)'s
1169
- `signing.py` (`canonical_string`), and `src/lib/url-signing.ts` is a port of it. The
1170
- canonical string is `\n`-joined: `v1`, lowercased scheme, lowercased host, the port always
1171
- explicit, the path, the remaining query with `dgk`/`dgx`/`dgs` removed and the rest sorted
1172
- and re-encoded, and the expiry. The test vectors in
1173
- `test/attachment-url-signing.test.ts` were verified against the Python implementation byte
1174
- for byte — three places where the obvious JavaScript disagrees with Python (`!*'()`
1175
- escaping, `+` decoding as a space, and code-point vs UTF-16 sort order) are why that check
1176
- exists rather than being assumed.
1168
+ The wire format is a `v1` canonical-string HMAC over the minted URL, implemented in
1169
+ `src/lib/url-signing.ts`. The canonical string is `\n`-joined: `v1`, lowercased scheme,
1170
+ lowercased host, the port always explicit, the path, the remaining query with `dgk`/`dgx`/`dgs`
1171
+ removed and the rest sorted and re-encoded, and the expiry. The test vectors in
1172
+ `test/attachment-url-signing.test.ts` pin the format byte for byte — including the three
1173
+ places where the obvious JavaScript encoding is wrong (`!*'()` escaping, `+` decoding as a
1174
+ space, and code-point vs UTF-16 sort order) — so the check exists rather than being assumed.
1177
1175
 
1178
1176
  The ticket travels in the **query, not the path**, because the verifying sidecar keeps a
1179
1177
  fetched URL's path in its error messages and strips the query.
@@ -1301,77 +1301,77 @@
1301
1301
  "method": "get",
1302
1302
  "toolName": "list-sharepoint-site-onenote-notebooks",
1303
1303
  "presets": ["onenote", "work"],
1304
- "workScopes": ["Notes.Read"]
1304
+ "workScopes": ["Notes.Read.All"]
1305
1305
  },
1306
1306
  {
1307
1307
  "pathPattern": "/sites/{site-id}/onenote/notebooks/{notebook-id}/sections",
1308
1308
  "method": "get",
1309
1309
  "toolName": "list-sharepoint-site-onenote-notebook-sections",
1310
1310
  "presets": ["onenote", "work"],
1311
- "workScopes": ["Notes.Read"]
1311
+ "workScopes": ["Notes.Read.All"]
1312
1312
  },
1313
1313
  {
1314
1314
  "pathPattern": "/sites/{site-id}/onenote/sections/{onenoteSection-id}/pages",
1315
1315
  "method": "get",
1316
1316
  "toolName": "list-sharepoint-site-onenote-section-pages",
1317
1317
  "presets": ["onenote", "work"],
1318
- "workScopes": ["Notes.Read"]
1318
+ "workScopes": ["Notes.Read.All"]
1319
1319
  },
1320
1320
  {
1321
1321
  "pathPattern": "/sites/{site-id}/onenote/notebooks/{notebook-id}/sectionGroups",
1322
1322
  "method": "get",
1323
1323
  "toolName": "list-sharepoint-site-onenote-notebook-section-groups",
1324
1324
  "presets": ["onenote", "work"],
1325
- "workScopes": ["Notes.Read"]
1325
+ "workScopes": ["Notes.Read.All"]
1326
1326
  },
1327
1327
  {
1328
1328
  "pathPattern": "/sites/{site-id}/onenote/sectionGroups/{sectionGroup-id}/sections",
1329
1329
  "method": "get",
1330
1330
  "toolName": "list-sharepoint-site-onenote-section-group-sections",
1331
1331
  "presets": ["onenote", "work"],
1332
- "workScopes": ["Notes.Read"]
1332
+ "workScopes": ["Notes.Read.All"]
1333
1333
  },
1334
1334
  {
1335
1335
  "pathPattern": "/sites/{site-id}/onenote/sectionGroups/{sectionGroup-id}/sectionGroups",
1336
1336
  "method": "get",
1337
1337
  "toolName": "list-sharepoint-site-onenote-section-group-section-groups",
1338
1338
  "presets": ["onenote", "work"],
1339
- "workScopes": ["Notes.Read"]
1339
+ "workScopes": ["Notes.Read.All"]
1340
1340
  },
1341
1341
  {
1342
1342
  "pathPattern": "/sites/{site-id}/onenote/pages/{onenotePage-id}/content",
1343
1343
  "method": "get",
1344
1344
  "toolName": "get-sharepoint-site-onenote-page-content",
1345
1345
  "presets": ["onenote", "work"],
1346
- "workScopes": ["Notes.Read"]
1346
+ "workScopes": ["Notes.Read.All"]
1347
1347
  },
1348
1348
  {
1349
1349
  "pathPattern": "/sites/{site-id}/onenote/notebooks",
1350
1350
  "method": "post",
1351
1351
  "toolName": "create-sharepoint-site-onenote-notebook",
1352
1352
  "presets": ["onenote", "work"],
1353
- "workScopes": ["Notes.Create"]
1353
+ "workScopes": ["Notes.ReadWrite.All"]
1354
1354
  },
1355
1355
  {
1356
1356
  "pathPattern": "/sites/{site-id}/onenote/notebooks/{notebook-id}/sections",
1357
1357
  "method": "post",
1358
1358
  "toolName": "create-sharepoint-site-onenote-section",
1359
1359
  "presets": ["onenote", "work"],
1360
- "workScopes": ["Notes.Create"]
1360
+ "workScopes": ["Notes.ReadWrite.All"]
1361
1361
  },
1362
1362
  {
1363
1363
  "pathPattern": "/sites/{site-id}/onenote/sectionGroups/{sectionGroup-id}/sections",
1364
1364
  "method": "post",
1365
1365
  "toolName": "create-sharepoint-site-onenote-section-group-section",
1366
1366
  "presets": ["onenote", "work"],
1367
- "workScopes": ["Notes.Create"]
1367
+ "workScopes": ["Notes.ReadWrite.All"]
1368
1368
  },
1369
1369
  {
1370
1370
  "pathPattern": "/sites/{site-id}/onenote/sections/{onenoteSection-id}/pages",
1371
1371
  "method": "post",
1372
1372
  "toolName": "create-sharepoint-site-onenote-section-page",
1373
1373
  "presets": ["onenote", "work"],
1374
- "workScopes": ["Notes.Create"],
1374
+ "workScopes": ["Notes.ReadWrite.All"],
1375
1375
  "contentType": "text/html",
1376
1376
  "llmTip": "Body must be a full HTML document (with <html><head><title>...</title></head><body>...</body></html>). Partial HTML fails silently."
1377
1377
  },
@@ -1380,7 +1380,7 @@
1380
1380
  "method": "patch",
1381
1381
  "toolName": "update-sharepoint-site-onenote-page-content",
1382
1382
  "presets": ["onenote", "work"],
1383
- "workScopes": ["Notes.ReadWrite"],
1383
+ "workScopes": ["Notes.ReadWrite.All"],
1384
1384
  "requestBodySchema": {
1385
1385
  "type": "array",
1386
1386
  "description": "Array of patchContentCommand objects applied in order to the page's HTML.",
@@ -1415,7 +1415,7 @@
1415
1415
  "method": "delete",
1416
1416
  "toolName": "delete-sharepoint-site-onenote-page",
1417
1417
  "presets": ["onenote", "work"],
1418
- "workScopes": ["Notes.ReadWrite"]
1418
+ "workScopes": ["Notes.ReadWrite.All"]
1419
1419
  },
1420
1420
  {
1421
1421
  "pathPattern": "/me/onenote/pages",
@@ -165,11 +165,12 @@ function toBlobResponse(data, blob) {
165
165
  };
166
166
  }
167
167
  class GraphClient {
168
- constructor(authManager, secrets, outputFormat = "json") {
168
+ constructor(authManager, secrets, outputFormat = "json", options = {}) {
169
169
  this.outputFormat = "json";
170
170
  this.authManager = authManager;
171
171
  this.secrets = secrets;
172
172
  this.outputFormat = outputFormat;
173
+ this.orgMode = Boolean(options.orgMode);
173
174
  }
174
175
  async makeRequest(endpoint, options = {}) {
175
176
  return (await this.makeRequestWithMetadata(endpoint, options)).data;
@@ -352,6 +353,9 @@ class GraphClient {
352
353
  if (this.authManager.isAppMode?.()) {
353
354
  return "Grant one of these as an application permission to your app registration (with admin consent), or for mail and calendars through Exchange RBAC for Applications.";
354
355
  }
356
+ if (this.orgMode) {
357
+ return "The access token does not carry a scope this request needs. Make sure the app registration has the permission and sign in again to consent to it.";
358
+ }
355
359
  return "This tool requires organization mode. Please restart with --org-mode flag.";
356
360
  }
357
361
  async createGraphApiError(response) {
package/dist/server.js CHANGED
@@ -318,7 +318,9 @@ class MicrosoftGraphServer {
318
318
  logger.info("On-Behalf-Of (OBO) flow enabled");
319
319
  }
320
320
  const outputFormat = this.options.toon ? "toon" : "json";
321
- this.graphClient = new GraphClient(this.authManager, this.secrets, outputFormat);
321
+ this.graphClient = new GraphClient(this.authManager, this.secrets, outputFormat, {
322
+ orgMode: Boolean(this.options.orgMode)
323
+ });
322
324
  if (!this.options.http) {
323
325
  this.server = this.createMcpServer();
324
326
  }
@@ -67,27 +67,34 @@ repeated conversion, particularly OCR, can produce different text; fresh URLs al
67
67
  not guarantee a stable snapshot. Restart or report that uncertainty instead of claiming
68
68
  gap-free coverage.
69
69
 
70
- ## Optional worked example: Docglean 0.1.3
71
-
72
- [Docglean](https://github.com/msoukhomlinov/docglean-mcp/tree/v0.1.3) is one possible
73
- processor, not a dependency. Its `probe_document(uri, auth_profile?)` can help choose a
74
- selection; `convert_to_markdown(uri, max_chars, offset=0, pages?, auth_profile?)` converts
75
- directly. Authentication-profile arguments are advertised only when configured. Every
76
- call downloads the source anew; a `pages` selection narrows conversion, not download size.
77
- Supported selection units depend on format, and some formats reject `pages`.
78
-
79
- For a PDF selection, call `convert_to_markdown` with a freshly minted URL as `uri`,
80
- `pages: "2"`, and `max_chars: 2000`. Preserve its native `markdown`, `next_offset`,
81
- `returned_chars`, `total_chars`, `content_status`, `format`, `pages_total`,
82
- `pages_returned`, `source_truncated`, and any `ocr` / `pdf_classification` evidence.
83
- If needed, mint a fresh URL and call again with the exact `next_offset` as `offset`,
84
- keeping `pages: "2"` and extraction settings unchanged. `max_chars` is a per-call output
85
- budget and may change without recomputing the returned offset.
86
-
87
- `next_offset: null` exhausts only the Markdown produced. `source_truncated` reports
88
- known CSV/workbook row-cap omissions; `false` does not guarantee source coverage.
89
- Inspect `content_status` and OCR evidence such as skipped pages/reasons or unread frames.
90
- Document-level classification is not proof that a selected range was fully read.
70
+ ## Optional worked example: a bring-your-own converter
71
+
72
+ Any converter MCP server that accepts a source URL is a possible processor, not a
73
+ dependency. The tool names and result fields below are illustrative of a URL-fetching
74
+ text converter: use the names, arguments and fields your converter actually advertises
75
+ (see the discovery guidance above), and preserve whatever it returns.
76
+
77
+ Suppose the converter advertises a probe tool (`probe(uri, …)`) that reports the
78
+ source's format and extent, and a convert tool
79
+ (`convert(uri, max_chars, offset=0, pages?)`) that fetches the source and returns
80
+ produced text plus a continuation offset. If it also advertises authentication-profile
81
+ arguments for sources that need their own credentials, pass them as the converter
82
+ documents. Every call downloads the source anew; a `pages` selection narrows
83
+ conversion, not download size. Supported selection units depend on format, and some
84
+ formats reject `pages`.
85
+
86
+ For a PDF selection, call the convert tool with a freshly minted URL as `uri`,
87
+ `pages: "2"`, and `max_chars: 2000`. Preserve its native result fields: the produced
88
+ text, the continuation offset, produced and total character counts, content status,
89
+ format, page counts, source truncation, and any OCR or classification evidence. If
90
+ needed, mint a fresh URL and call again with the exact offset the converter returned,
91
+ keeping `pages: "2"` and the extraction settings unchanged. `max_chars` is a per-call
92
+ output budget and may change without recomputing the returned offset.
93
+
94
+ A null (or absent) continuation offset exhausts only the text produced. A source-truncation
95
+ flag reports known row-cap omissions; its absence does not guarantee source coverage.
96
+ Inspect the content status and OCR evidence such as skipped pages/reasons or unread
97
+ frames. Document-level classification is not proof that a selected range was fully read.
91
98
 
92
99
  ## Verification and limits
93
100
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
3
  "mcpName": "io.github.Softeria/ms-365-mcp-server",
4
- "version": "0.181.0",
4
+ "version": "0.181.2",
5
5
  "description": " A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -1301,77 +1301,77 @@
1301
1301
  "method": "get",
1302
1302
  "toolName": "list-sharepoint-site-onenote-notebooks",
1303
1303
  "presets": ["onenote", "work"],
1304
- "workScopes": ["Notes.Read"]
1304
+ "workScopes": ["Notes.Read.All"]
1305
1305
  },
1306
1306
  {
1307
1307
  "pathPattern": "/sites/{site-id}/onenote/notebooks/{notebook-id}/sections",
1308
1308
  "method": "get",
1309
1309
  "toolName": "list-sharepoint-site-onenote-notebook-sections",
1310
1310
  "presets": ["onenote", "work"],
1311
- "workScopes": ["Notes.Read"]
1311
+ "workScopes": ["Notes.Read.All"]
1312
1312
  },
1313
1313
  {
1314
1314
  "pathPattern": "/sites/{site-id}/onenote/sections/{onenoteSection-id}/pages",
1315
1315
  "method": "get",
1316
1316
  "toolName": "list-sharepoint-site-onenote-section-pages",
1317
1317
  "presets": ["onenote", "work"],
1318
- "workScopes": ["Notes.Read"]
1318
+ "workScopes": ["Notes.Read.All"]
1319
1319
  },
1320
1320
  {
1321
1321
  "pathPattern": "/sites/{site-id}/onenote/notebooks/{notebook-id}/sectionGroups",
1322
1322
  "method": "get",
1323
1323
  "toolName": "list-sharepoint-site-onenote-notebook-section-groups",
1324
1324
  "presets": ["onenote", "work"],
1325
- "workScopes": ["Notes.Read"]
1325
+ "workScopes": ["Notes.Read.All"]
1326
1326
  },
1327
1327
  {
1328
1328
  "pathPattern": "/sites/{site-id}/onenote/sectionGroups/{sectionGroup-id}/sections",
1329
1329
  "method": "get",
1330
1330
  "toolName": "list-sharepoint-site-onenote-section-group-sections",
1331
1331
  "presets": ["onenote", "work"],
1332
- "workScopes": ["Notes.Read"]
1332
+ "workScopes": ["Notes.Read.All"]
1333
1333
  },
1334
1334
  {
1335
1335
  "pathPattern": "/sites/{site-id}/onenote/sectionGroups/{sectionGroup-id}/sectionGroups",
1336
1336
  "method": "get",
1337
1337
  "toolName": "list-sharepoint-site-onenote-section-group-section-groups",
1338
1338
  "presets": ["onenote", "work"],
1339
- "workScopes": ["Notes.Read"]
1339
+ "workScopes": ["Notes.Read.All"]
1340
1340
  },
1341
1341
  {
1342
1342
  "pathPattern": "/sites/{site-id}/onenote/pages/{onenotePage-id}/content",
1343
1343
  "method": "get",
1344
1344
  "toolName": "get-sharepoint-site-onenote-page-content",
1345
1345
  "presets": ["onenote", "work"],
1346
- "workScopes": ["Notes.Read"]
1346
+ "workScopes": ["Notes.Read.All"]
1347
1347
  },
1348
1348
  {
1349
1349
  "pathPattern": "/sites/{site-id}/onenote/notebooks",
1350
1350
  "method": "post",
1351
1351
  "toolName": "create-sharepoint-site-onenote-notebook",
1352
1352
  "presets": ["onenote", "work"],
1353
- "workScopes": ["Notes.Create"]
1353
+ "workScopes": ["Notes.ReadWrite.All"]
1354
1354
  },
1355
1355
  {
1356
1356
  "pathPattern": "/sites/{site-id}/onenote/notebooks/{notebook-id}/sections",
1357
1357
  "method": "post",
1358
1358
  "toolName": "create-sharepoint-site-onenote-section",
1359
1359
  "presets": ["onenote", "work"],
1360
- "workScopes": ["Notes.Create"]
1360
+ "workScopes": ["Notes.ReadWrite.All"]
1361
1361
  },
1362
1362
  {
1363
1363
  "pathPattern": "/sites/{site-id}/onenote/sectionGroups/{sectionGroup-id}/sections",
1364
1364
  "method": "post",
1365
1365
  "toolName": "create-sharepoint-site-onenote-section-group-section",
1366
1366
  "presets": ["onenote", "work"],
1367
- "workScopes": ["Notes.Create"]
1367
+ "workScopes": ["Notes.ReadWrite.All"]
1368
1368
  },
1369
1369
  {
1370
1370
  "pathPattern": "/sites/{site-id}/onenote/sections/{onenoteSection-id}/pages",
1371
1371
  "method": "post",
1372
1372
  "toolName": "create-sharepoint-site-onenote-section-page",
1373
1373
  "presets": ["onenote", "work"],
1374
- "workScopes": ["Notes.Create"],
1374
+ "workScopes": ["Notes.ReadWrite.All"],
1375
1375
  "contentType": "text/html",
1376
1376
  "llmTip": "Body must be a full HTML document (with <html><head><title>...</title></head><body>...</body></html>). Partial HTML fails silently."
1377
1377
  },
@@ -1380,7 +1380,7 @@
1380
1380
  "method": "patch",
1381
1381
  "toolName": "update-sharepoint-site-onenote-page-content",
1382
1382
  "presets": ["onenote", "work"],
1383
- "workScopes": ["Notes.ReadWrite"],
1383
+ "workScopes": ["Notes.ReadWrite.All"],
1384
1384
  "requestBodySchema": {
1385
1385
  "type": "array",
1386
1386
  "description": "Array of patchContentCommand objects applied in order to the page's HTML.",
@@ -1415,7 +1415,7 @@
1415
1415
  "method": "delete",
1416
1416
  "toolName": "delete-sharepoint-site-onenote-page",
1417
1417
  "presets": ["onenote", "work"],
1418
- "workScopes": ["Notes.ReadWrite"]
1418
+ "workScopes": ["Notes.ReadWrite.All"]
1419
1419
  },
1420
1420
  {
1421
1421
  "pathPattern": "/me/onenote/pages",
@@ -44,13 +44,13 @@ improvements should now be much easier to implement and maintain.
44
44
  To regenerate the client code (e.g., after API changes or to update the supported endpoints):
45
45
 
46
46
  ```
47
- npm run bin/generate-graph-client.mjs
47
+ node bin/generate-graph-client.mjs
48
48
  ```
49
49
 
50
50
  This command does the following:
51
51
 
52
52
  1. Fetches/processes the OpenAPI spec
53
53
  2. Generates the TypeScript client with Zod validation
54
- 3. Outputs the result to `client.ts` in this directory
54
+ 3. Writes the v1.0 and beta clients to `client.ts` and `client-beta.ts`.
55
55
 
56
56
  No complex build scripts needed - the generation is handled by openapi-zod-client.