@pnp/cli-microsoft365 12.0.0-beta.1752794 → 12.0.0-beta.4ac11a7

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.
Files changed (40) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +15 -1
  4. package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +15 -0
  5. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.0-rc.0.js +19 -0
  6. package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
  7. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012021_TSC_excludeDirectories.js +43 -0
  8. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027002_OVERRIDES_qs.js +33 -0
  9. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027003_OVERRIDES_uuid.js +33 -0
  10. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.0-rc.0.js +77 -0
  11. package/dist/m365/spfx/commands/project/project-upgrade.js +12 -11
  12. package/dist/m365/spo/commands/navigation/navigation-node-add.js +74 -120
  13. package/dist/m365/spo/commands/navigation/navigation-node-get.js +4 -13
  14. package/dist/m365/spo/commands/navigation/navigation-node-set.js +53 -114
  15. package/dist/m365/spo/commands/page/page-unpublish.js +53 -0
  16. package/dist/m365/spo/commands/sitescript/sitescript-add.js +22 -37
  17. package/dist/m365/spo/commands/sitescript/sitescript-get.js +9 -26
  18. package/dist/m365/spo/commands/sitescript/sitescript-list.js +5 -0
  19. package/dist/m365/spo/commands/sitescript/sitescript-remove.js +9 -33
  20. package/dist/m365/spo/commands/sitescript/sitescript-set.js +29 -56
  21. package/dist/m365/spo/commands.js +1 -0
  22. package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +5 -0
  23. package/dist/m365/spp/commands/model/model-get.js +25 -45
  24. package/dist/m365/spp/commands/model/model-list.js +12 -23
  25. package/dist/m365/spp/commands/model/model-remove.js +25 -45
  26. package/dist/utils/spo.js +39 -0
  27. package/docs/docs/cmd/login.mdx +15 -2
  28. package/docs/docs/cmd/spo/navigation/navigation-node-add.mdx +45 -30
  29. package/docs/docs/cmd/spo/navigation/navigation-node-get.mdx +64 -42
  30. package/docs/docs/cmd/spo/navigation/navigation-node-set.mdx +10 -8
  31. package/docs/docs/cmd/spo/page/page-unpublish.mdx +63 -0
  32. package/docs/docs/cmd/teams/tab/tab-add.mdx +19 -0
  33. package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -0
  34. package/docs/docs/cmd/teams/tab/tab-list.mdx +19 -0
  35. package/docs/docs/cmd/teams/tab/tab-remove.mdx +21 -0
  36. package/docs/docs/cmd/viva/engage/engage-message-add.mdx +17 -0
  37. package/docs/docs/cmd/viva/engage/engage-message-get.mdx +17 -0
  38. package/docs/docs/cmd/viva/engage/engage-message-list.mdx +17 -0
  39. package/docs/docs/cmd/viva/engage/engage-message-remove.mdx +19 -0
  40. package/package.json +4 -6
@@ -1,15 +1,22 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SppModelGetCommand_instances, _SppModelGetCommand_initTelemetry, _SppModelGetCommand_initOptions, _SppModelGetCommand_initValidators, _SppModelGetCommand_initOptionSets, _SppModelGetCommand_initTypes;
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
7
3
  import { odata } from '../../../../utils/odata.js';
8
4
  import { spp } from '../../../../utils/spp.js';
9
5
  import { urlUtil } from '../../../../utils/urlUtil.js';
10
6
  import { validation } from '../../../../utils/validation.js';
11
7
  import SpoCommand from '../../../base/SpoCommand.js';
12
8
  import commands from '../../commands.js';
9
+ export const options = z.strictObject({
10
+ ...globalOptionsZod.shape,
11
+ siteUrl: z.string()
12
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
13
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
14
+ })
15
+ .alias('u'),
16
+ id: z.guid().optional().alias('i'),
17
+ title: z.string().optional().alias('t'),
18
+ withPublications: z.boolean().optional()
19
+ });
13
20
  class SppModelGetCommand extends SpoCommand {
14
21
  get name() {
15
22
  return commands.MODEL_GET;
@@ -17,14 +24,18 @@ class SppModelGetCommand extends SpoCommand {
17
24
  get description() {
18
25
  return 'Retrieves information about a document understanding model';
19
26
  }
20
- constructor() {
21
- super();
22
- _SppModelGetCommand_instances.add(this);
23
- __classPrivateFieldGet(this, _SppModelGetCommand_instances, "m", _SppModelGetCommand_initTelemetry).call(this);
24
- __classPrivateFieldGet(this, _SppModelGetCommand_instances, "m", _SppModelGetCommand_initOptions).call(this);
25
- __classPrivateFieldGet(this, _SppModelGetCommand_instances, "m", _SppModelGetCommand_initValidators).call(this);
26
- __classPrivateFieldGet(this, _SppModelGetCommand_instances, "m", _SppModelGetCommand_initOptionSets).call(this);
27
- __classPrivateFieldGet(this, _SppModelGetCommand_instances, "m", _SppModelGetCommand_initTypes).call(this);
27
+ get schema() {
28
+ return options;
29
+ }
30
+ getRefinedSchema(schema) {
31
+ return schema
32
+ .refine(opts => [opts.id, opts.title].filter(x => x !== undefined).length === 1, {
33
+ message: `Specify either 'id' or 'title', but not both.`,
34
+ params: {
35
+ customCode: 'optionSet',
36
+ options: ['id', 'title']
37
+ }
38
+ });
28
39
  }
29
40
  async commandAction(logger, args) {
30
41
  try {
@@ -56,36 +67,5 @@ class SppModelGetCommand extends SpoCommand {
56
67
  }
57
68
  }
58
69
  }
59
- _SppModelGetCommand_instances = new WeakSet(), _SppModelGetCommand_initTelemetry = function _SppModelGetCommand_initTelemetry() {
60
- this.telemetry.push((args) => {
61
- Object.assign(this.telemetryProperties, {
62
- id: typeof args.options.id !== 'undefined',
63
- title: typeof args.options.title !== 'undefined',
64
- withPublications: !!args.options.withPublications
65
- });
66
- });
67
- }, _SppModelGetCommand_initOptions = function _SppModelGetCommand_initOptions() {
68
- this.options.unshift({
69
- option: '-u, --siteUrl <siteUrl>'
70
- }, {
71
- option: '-i, --id [id]'
72
- }, {
73
- option: '-t, --title [title]'
74
- }, {
75
- option: '--withPublications'
76
- });
77
- }, _SppModelGetCommand_initValidators = function _SppModelGetCommand_initValidators() {
78
- this.validators.push(async (args) => {
79
- if (args.options.id && !validation.isValidGuid(args.options.id)) {
80
- return `${args.options.id} is not a valid GUID for option 'id'.`;
81
- }
82
- return validation.isValidSharePointUrl(args.options.siteUrl);
83
- });
84
- }, _SppModelGetCommand_initOptionSets = function _SppModelGetCommand_initOptionSets() {
85
- this.optionSets.push({ options: ['id', 'title'] });
86
- }, _SppModelGetCommand_initTypes = function _SppModelGetCommand_initTypes() {
87
- this.types.string.push('siteUrl', 'id', 'title');
88
- this.types.boolean.push('withPublications');
89
- };
90
70
  export default new SppModelGetCommand();
91
71
  //# sourceMappingURL=model-get.js.map
@@ -1,15 +1,19 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SppModelListCommand_instances, _SppModelListCommand_initOptions, _SppModelListCommand_initTypes, _SppModelListCommand_initValidators;
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
7
3
  import { odata } from '../../../../utils/odata.js';
8
4
  import { spp } from '../../../../utils/spp.js';
9
5
  import { urlUtil } from '../../../../utils/urlUtil.js';
10
6
  import { validation } from '../../../../utils/validation.js';
11
7
  import SpoCommand from '../../../base/SpoCommand.js';
12
8
  import commands from '../../commands.js';
9
+ export const options = z.strictObject({
10
+ ...globalOptionsZod.shape,
11
+ siteUrl: z.string()
12
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
13
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
14
+ })
15
+ .alias('u')
16
+ });
13
17
  class SppModelListCommand extends SpoCommand {
14
18
  get name() {
15
19
  return commands.MODEL_LIST;
@@ -20,12 +24,8 @@ class SppModelListCommand extends SpoCommand {
20
24
  defaultProperties() {
21
25
  return ['AIBuilderHybridModelType', 'ContentTypeName', 'LastTrained', 'UniqueId'];
22
26
  }
23
- constructor() {
24
- super();
25
- _SppModelListCommand_instances.add(this);
26
- __classPrivateFieldGet(this, _SppModelListCommand_instances, "m", _SppModelListCommand_initOptions).call(this);
27
- __classPrivateFieldGet(this, _SppModelListCommand_instances, "m", _SppModelListCommand_initTypes).call(this);
28
- __classPrivateFieldGet(this, _SppModelListCommand_instances, "m", _SppModelListCommand_initValidators).call(this);
27
+ get schema() {
28
+ return options;
29
29
  }
30
30
  async commandAction(logger, args) {
31
31
  try {
@@ -42,16 +42,5 @@ class SppModelListCommand extends SpoCommand {
42
42
  }
43
43
  }
44
44
  }
45
- _SppModelListCommand_instances = new WeakSet(), _SppModelListCommand_initOptions = function _SppModelListCommand_initOptions() {
46
- this.options.unshift({
47
- option: '-u, --siteUrl <siteUrl>'
48
- });
49
- }, _SppModelListCommand_initTypes = function _SppModelListCommand_initTypes() {
50
- this.types.string.push('siteUrl');
51
- }, _SppModelListCommand_initValidators = function _SppModelListCommand_initValidators() {
52
- this.validators.push(async (args) => {
53
- return validation.isValidSharePointUrl(args.options.siteUrl);
54
- });
55
- };
56
45
  export default new SppModelListCommand();
57
46
  //# sourceMappingURL=model-list.js.map
@@ -1,9 +1,5 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SppModelRemoveCommand_instances, _SppModelRemoveCommand_initTelemetry, _SppModelRemoveCommand_initOptions, _SppModelRemoveCommand_initValidators, _SppModelRemoveCommand_initOptionSets, _SppModelRemoveCommand_initTypes;
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
7
3
  import { cli } from '../../../../cli/cli.js';
8
4
  import request from '../../../../request.js';
9
5
  import { formatting } from '../../../../utils/formatting.js';
@@ -12,6 +8,17 @@ import { urlUtil } from '../../../../utils/urlUtil.js';
12
8
  import { validation } from '../../../../utils/validation.js';
13
9
  import SpoCommand from '../../../base/SpoCommand.js';
14
10
  import commands from '../../commands.js';
11
+ export const options = z.strictObject({
12
+ ...globalOptionsZod.shape,
13
+ siteUrl: z.string()
14
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
15
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
16
+ })
17
+ .alias('u'),
18
+ id: z.guid().optional().alias('i'),
19
+ title: z.string().optional().alias('t'),
20
+ force: z.boolean().optional().alias('f')
21
+ });
15
22
  class SppModelRemoveCommand extends SpoCommand {
16
23
  get name() {
17
24
  return commands.MODEL_REMOVE;
@@ -19,14 +26,18 @@ class SppModelRemoveCommand extends SpoCommand {
19
26
  get description() {
20
27
  return 'Deletes a document understanding model';
21
28
  }
22
- constructor() {
23
- super();
24
- _SppModelRemoveCommand_instances.add(this);
25
- __classPrivateFieldGet(this, _SppModelRemoveCommand_instances, "m", _SppModelRemoveCommand_initTelemetry).call(this);
26
- __classPrivateFieldGet(this, _SppModelRemoveCommand_instances, "m", _SppModelRemoveCommand_initOptions).call(this);
27
- __classPrivateFieldGet(this, _SppModelRemoveCommand_instances, "m", _SppModelRemoveCommand_initValidators).call(this);
28
- __classPrivateFieldGet(this, _SppModelRemoveCommand_instances, "m", _SppModelRemoveCommand_initOptionSets).call(this);
29
- __classPrivateFieldGet(this, _SppModelRemoveCommand_instances, "m", _SppModelRemoveCommand_initTypes).call(this);
29
+ get schema() {
30
+ return options;
31
+ }
32
+ getRefinedSchema(schema) {
33
+ return schema
34
+ .refine(opts => [opts.id, opts.title].filter(x => x !== undefined).length === 1, {
35
+ message: `Specify either 'id' or 'title', but not both.`,
36
+ params: {
37
+ customCode: 'optionSet',
38
+ options: ['id', 'title']
39
+ }
40
+ });
30
41
  }
31
42
  async commandAction(logger, args) {
32
43
  try {
@@ -70,36 +81,5 @@ class SppModelRemoveCommand extends SpoCommand {
70
81
  }
71
82
  }
72
83
  }
73
- _SppModelRemoveCommand_instances = new WeakSet(), _SppModelRemoveCommand_initTelemetry = function _SppModelRemoveCommand_initTelemetry() {
74
- this.telemetry.push((args) => {
75
- Object.assign(this.telemetryProperties, {
76
- id: typeof args.options.id !== 'undefined',
77
- title: typeof args.options.title !== 'undefined',
78
- force: !!args.options.force
79
- });
80
- });
81
- }, _SppModelRemoveCommand_initOptions = function _SppModelRemoveCommand_initOptions() {
82
- this.options.unshift({
83
- option: '-u, --siteUrl <siteUrl>'
84
- }, {
85
- option: '-i, --id [id]'
86
- }, {
87
- option: '-t, --title [title]'
88
- }, {
89
- option: '-f, --force'
90
- });
91
- }, _SppModelRemoveCommand_initValidators = function _SppModelRemoveCommand_initValidators() {
92
- this.validators.push(async (args) => {
93
- if (args.options.id && !validation.isValidGuid(args.options.id)) {
94
- return `${args.options.id} is not a valid GUID for option 'id'.`;
95
- }
96
- return validation.isValidSharePointUrl(args.options.siteUrl);
97
- });
98
- }, _SppModelRemoveCommand_initOptionSets = function _SppModelRemoveCommand_initOptionSets() {
99
- this.optionSets.push({ options: ['id', 'title'] });
100
- }, _SppModelRemoveCommand_initTypes = function _SppModelRemoveCommand_initTypes() {
101
- this.types.string.push('siteUrl', 'id', 'title');
102
- this.types.boolean.push('force');
103
- };
104
84
  export default new SppModelRemoveCommand();
105
85
  //# sourceMappingURL=model-remove.js.map
package/dist/utils/spo.js CHANGED
@@ -576,6 +576,45 @@ export const spo = {
576
576
  return request.post(requestOptions);
577
577
  },
578
578
  /**
579
+ * Retrieves the navigation node with the specified key.
580
+ * Returns the node along with the menu state that contains it.
581
+ * @param webUrl Web url
582
+ * @param key Key (ID) of the navigation node
583
+ * @param location Navigation to search. When not specified, searches the quick launch first and then the top navigation
584
+ */
585
+ async getMenuStateNodeByKey(webUrl, key, location) {
586
+ const locations = location ? [location] : ['QuickLaunch', 'TopNavigationBar'];
587
+ for (const navigationLocation of locations) {
588
+ const menuState = navigationLocation === 'TopNavigationBar'
589
+ ? await this.getTopNavigationMenuState(webUrl)
590
+ : await this.getQuickLaunchMenuState(webUrl);
591
+ const node = this.findMenuStateNode(menuState.Nodes, key);
592
+ if (node) {
593
+ return { menuState, node };
594
+ }
595
+ }
596
+ throw location
597
+ ? `Navigation node with id '${key}' not found in ${location}.`
598
+ : `Navigation node with id '${key}' not found.`;
599
+ },
600
+ /**
601
+ * Recursively searches the specified menu state nodes for the node with the specified key.
602
+ * @param nodes Menu state nodes to search
603
+ * @param key Key (ID) of the navigation node
604
+ */
605
+ findMenuStateNode(nodes, key) {
606
+ for (const node of nodes) {
607
+ if (node.Key === key) {
608
+ return node;
609
+ }
610
+ const childNode = this.findMenuStateNode(node.Nodes, key);
611
+ if (childNode) {
612
+ return childNode;
613
+ }
614
+ }
615
+ return undefined;
616
+ },
617
+ /**
579
618
  * Retrieves the spo group by name.
580
619
  * Returns a group object
581
620
  * @param webUrl Web url
@@ -78,7 +78,20 @@ When logging in to Microsoft 365 using the user name and password, next to the a
78
78
 
79
79
  When logging in to Microsoft 365 using a certificate, the CLI for Microsoft 365 will store the contents of the certificate so that it can automatically re-authenticate if necessary. The contents of the certificate are removed by re-authenticating using the device code or by calling the [logout](logout.mdx) command.
80
80
 
81
- Federated Identity is currently supported in GitHub Actions. To use this you need to set `authType` to `federatedIdentity` and specify `appId` and `tenant` to the values of the app registration you've configured a federated credential on.
81
+ Federated Identity is currently supported in GitHub Actions, Azure DevOps and GitLab CI/CD. To use this you need to set `authType` to `federatedIdentity` and specify `appId` and `tenant` to the values of the app registration you've configured a federated credential on.
82
+
83
+ To use Federated Identity in GitLab CI/CD, the job must request an ID token named `GITLAB_OIDC_TOKEN` with audience `api://AzureADTokenExchange`, for example:
84
+
85
+ ```yaml
86
+ job:
87
+ id_tokens:
88
+ GITLAB_OIDC_TOKEN:
89
+ aud: "api://AzureADTokenExchange"
90
+ script:
91
+ - m365 login --authType federatedIdentity --appId eb96cfd0-abfa-4477-8d1d-c6dfde3efb19 --tenant 9a1a1bbd-e158-4cf5-967d-a53b8e85c628
92
+ ```
93
+
94
+ The corresponding federated credential on the Microsoft Entra app registration must have issuer `https://gitlab.com` (or your self-managed GitLab instance URL) and a subject matching the GitLab OIDC claim for the job, for example `project_path:<group>/<project>:ref_type:branch:ref:<branch>`.
82
95
 
83
96
  To log in to Microsoft 365 using a certificate or secret, you will typically [create a custom Microsoft Entra application](../user-guide/using-own-identity.mdx). To use this application with the CLI for Microsoft 365, you will set the `CLIMICROSOFT365_ENTRAAPPID` environment variable to the application's ID and the `CLIMICROSOFT365_TENANT` environment variable to the ID of the Microsoft Entra tenant, where you created the Microsoft Entra application. Also, please make sure to read about [the caveats when using the certificate login option](../user-guide/cli-certificate-caveats.mdx).
84
97
 
@@ -202,7 +215,7 @@ Log in to Microsoft 365 using a user-assigned managed identity with `clientId` s
202
215
  m365 login --authType identity --userName ac9fbed5-804c-4362-a369-21a4ec51109e
203
216
  ```
204
217
 
205
- Log in to Microsoft 365 using a federated identity. Can currently only be used in GitHub Actions.
218
+ Log in to Microsoft 365 using a federated identity. Can currently only be used in GitHub Actions, Azure DevOps and GitLab CI/CD.
206
219
 
207
220
  ```sh
208
221
  m365 login --authType federatedIdentity --appId eb96cfd0-abfa-4477-8d1d-c6dfde3efb19 --tenant 9a1a1bbd-e158-4cf5-967d-a53b8e85c628
@@ -30,9 +30,6 @@ m365 spo navigation node add [options]
30
30
  `--parentNodeId [parentNodeId]`
31
31
  : ID of the node below which the node should be added. Specify either `location` or `parentNodeId` but not both.
32
32
 
33
- `--isExternal`
34
- : Set, if the navigation node points to an external URL.
35
-
36
33
  `--audienceIds [audienceIds]`
37
34
  : Comma-separated list of group IDs that will be used for audience targeting. The limit is 10 ids per navigation node.
38
35
 
@@ -57,7 +54,7 @@ m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-
57
54
  Add a navigation node pointing to an external page to the quick launch.
58
55
 
59
56
  ```sh
60
- m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location QuickLaunch --title "About us" --url https://contoso.com/about-us --isExternal
57
+ m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location QuickLaunch --title "About us" --url https://contoso.com/about-us
61
58
  ```
62
59
 
63
60
  Add a navigation node below an existing node and opens it in a new window.
@@ -72,6 +69,12 @@ Add a navigation node to the top navigation which is audience targetted and open
72
69
  m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location TopNavigationBar --title About --url /sites/team-s/sitepages/about.aspx --audienceIds "7aa4a1ca-4035-4f2f-bac7-7beada59b5ba,4bbf236f-a131-4019-b4a2-315902fcfa3a" --openInNewWindow
73
70
  ```
74
71
 
72
+ Add a linkless label to the quick launch.
73
+
74
+ ```sh
75
+ m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location QuickLaunch --title Resources
76
+ ```
77
+
75
78
  ## Response
76
79
 
77
80
  <Tabs>
@@ -83,13 +86,18 @@ m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-
83
86
  "7aa4a1ca-4035-4f2f-bac7-7beada59b5ba"
84
87
  ],
85
88
  "CurrentLCID": 1033,
86
- "Id": 2030,
87
- "IsDocLib": true,
88
- "IsExternal": true,
89
- "IsVisible": true,
90
- "ListTemplateType": 0,
89
+ "CustomProperties": [],
90
+ "FriendlyUrlSegment": "",
91
+ "IsDeleted": false,
92
+ "IsHidden": false,
93
+ "IsTitleForExistingLanguage": false,
94
+ "Key": "2030",
95
+ "Nodes": [],
96
+ "NodeType": 0,
97
+ "OpenInNewWindow": true,
98
+ "SimpleUrl": "https://contoso.sharepoint.com",
91
99
  "Title": "Navigation Link",
92
- "Url": "https://contoso.sharepoint.com"
100
+ "Translations": []
93
101
  }
94
102
  ```
95
103
 
@@ -97,45 +105,52 @@ m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-
97
105
  <TabItem value="Text">
98
106
 
99
107
  ```text
100
- AudienceIds : ["7aa4a1ca-4035-4f2f-bac7-7beada59b5ba"]
101
- CurrentLCID : 1033
102
- Id : 2031
103
- IsDocLib : true
104
- IsExternal : true
105
- IsVisible : true
106
- ListTemplateType: 0
107
- Title : Navigation Link
108
- Url : https://contoso.sharepoint.com
108
+ AudienceIds : ["7aa4a1ca-4035-4f2f-bac7-7beada59b5ba"]
109
+ CurrentLCID : 1033
110
+ CustomProperties : []
111
+ FriendlyUrlSegment :
112
+ IsDeleted : false
113
+ IsHidden : false
114
+ IsTitleForExistingLanguage: false
115
+ Key : 2030
116
+ NodeType : 0
117
+ Nodes : []
118
+ OpenInNewWindow : true
119
+ SimpleUrl : https://contoso.sharepoint.com
120
+ Title : Navigation Link
121
+ Translations : []
109
122
  ```
110
123
 
111
124
  </TabItem>
112
125
  <TabItem value="CSV">
113
126
 
114
127
  ```csv
115
- AudienceIds,CurrentLCID,Id,IsDocLib,IsExternal,IsVisible,ListTemplateType,Title,Url
116
- "[""7aa4a1ca-4035-4f2f-bac7-7beada59b5ba""]",1033,2032,1,1,1,0,Navigation Link,https://contoso.sharepoint.com
128
+ CurrentLCID,FriendlyUrlSegment,IsDeleted,IsHidden,IsTitleForExistingLanguage,Key,NodeType,OpenInNewWindow,SimpleUrl,Title
129
+ 1033,,0,0,0,2030,0,1,https://contoso.sharepoint.com,Navigation Link
117
130
  ```
118
131
 
119
132
  </TabItem>
120
133
  <TabItem value="Markdown">
121
134
 
122
135
  ```md
123
- # spo navigation node get --webUrl "https://contoso.sharepoint.com/sites/team-a" --location "TopNavigationBar" --title "Navigation Link" --url "https://contoso.sharepoint.com"
136
+ # spo navigation node add --webUrl "https://contoso.sharepoint.com/sites/team-a" --location "TopNavigationBar" --title "Navigation Link" --url "https://contoso.sharepoint.com" --openInNewWindow "true"
124
137
 
125
- Date: 2/20/2023
138
+ Date: 10/7/2026
126
139
 
127
- ## Navigation Link (2030)
140
+ ## Navigation Link
128
141
 
129
142
  Property | Value
130
143
  ---------|-------
131
144
  CurrentLCID | 1033
132
- Id | 2030
133
- IsDocLib | true
134
- IsExternal | false
135
- IsVisible | true
136
- ListTemplateType | 0
145
+ FriendlyUrlSegment |
146
+ IsDeleted | false
147
+ IsHidden | false
148
+ IsTitleForExistingLanguage | false
149
+ Key | 2030
150
+ NodeType | 0
151
+ OpenInNewWindow | true
152
+ SimpleUrl | https://contoso.sharepoint.com
137
153
  Title | Navigation Link
138
- Url | https://contoso.sharepoint.com
139
154
  ```
140
155
 
141
156
  </TabItem>
@@ -18,6 +18,9 @@ m365 spo navigation node get [options]
18
18
  `-u, --webUrl <webUrl>`
19
19
  : Absolute URL of the site.
20
20
 
21
+ `-l, --location <location>`
22
+ : Navigation type where the node is located. Available options: `QuickLaunch`, `TopNavigationBar`.
23
+
21
24
  `--id <id>`
22
25
  : Id of the navigation node.
23
26
  ```
@@ -45,10 +48,16 @@ m365 spo navigation node get [options]
45
48
 
46
49
  ## Examples
47
50
 
48
- Retrieve information for a specific navigation node.
51
+ Retrieve information for a specific navigation node from the quick launch.
49
52
 
50
53
  ```sh
51
- m365 spo navigation node get --webUrl https://contoso.sharepoint.com/sites/Marketing --id 2209
54
+ m365 spo navigation node get --webUrl https://contoso.sharepoint.com/sites/Marketing --location QuickLaunch --id 2209
55
+ ```
56
+
57
+ Retrieve information for a specific navigation node from the top navigation.
58
+
59
+ ```sh
60
+ m365 spo navigation node get --webUrl https://contoso.sharepoint.com/sites/Marketing --location TopNavigationBar --id 2209
52
61
  ```
53
62
 
54
63
  ## Response
@@ -58,31 +67,39 @@ m365 spo navigation node get --webUrl https://contoso.sharepoint.com/sites/Marke
58
67
 
59
68
  ```json
60
69
  {
61
- "Children": [
70
+ "AudienceIds": [
71
+ "0d718612-8407-4d6b-833c-6891a553354f"
72
+ ],
73
+ "CurrentLCID": 1033,
74
+ "CustomProperties": [],
75
+ "FriendlyUrlSegment": "",
76
+ "IsDeleted": false,
77
+ "IsHidden": false,
78
+ "IsTitleForExistingLanguage": false,
79
+ "Key": "2209",
80
+ "Nodes": [
62
81
  {
63
- "AudienceIds": null,
82
+ "AudienceIds": [],
64
83
  "CurrentLCID": 1033,
65
- "Id": 2033,
66
- "IsDocLib": true,
67
- "IsExternal": true,
68
- "IsVisible": true,
69
- "ListTemplateType": 0,
84
+ "CustomProperties": [],
85
+ "FriendlyUrlSegment": "",
86
+ "IsDeleted": false,
87
+ "IsHidden": false,
88
+ "IsTitleForExistingLanguage": false,
89
+ "Key": "2210",
90
+ "Nodes": [],
91
+ "NodeType": 0,
92
+ "OpenInNewWindow": true,
93
+ "SimpleUrl": "https://microsoft365.com",
70
94
  "Title": "Microsoft 365",
71
- "Url": "https://microsoft365.com",
72
- "Children": []
95
+ "Translations": []
73
96
  }
74
97
  ],
75
- "AudienceIds": [
76
- "0d718612-8407-4d6b-833c-6891a553354f"
77
- ],
78
- "CurrentLCID": 1033,
79
- "Id": 2209,
80
- "IsDocLib": true,
81
- "IsExternal": false,
82
- "IsVisible": true,
83
- "ListTemplateType": 100,
98
+ "NodeType": 0,
99
+ "OpenInNewWindow": null,
100
+ "SimpleUrl": "/sites/Marketing/Lists/Work Status/AllItems.aspx",
84
101
  "Title": "Work Status",
85
- "Url": "/sites/Marketing/Lists/Work Status/AllItems.aspx"
102
+ "Translations": []
86
103
  }
87
104
  ```
88
105
 
@@ -90,46 +107,51 @@ m365 spo navigation node get --webUrl https://contoso.sharepoint.com/sites/Marke
90
107
  <TabItem value="Text">
91
108
 
92
109
  ```text
93
- Children : [{ AudienceIds: null, CurrentLCID: 1033, Id: 2033, IsDocLib: true, IsExternal: true, IsVisible: true, ListTemplateType: 0, Title: "Microsoft 365", Url: "https://microsoft365.com", Children: [] }]
94
- AudienceIds : ["0d718612-8407-4d6b-833c-6891a553354f"]
95
- CurrentLCID : 1033
96
- Id : 2209
97
- IsDocLib : true
98
- IsExternal : false
99
- IsVisible : true
100
- ListTemplateType: 100
101
- Title : Work Status
102
- Url : /sites/Marketing/Lists/Work Status/AllItems.aspx
110
+ AudienceIds : ["0d718612-8407-4d6b-833c-6891a553354f"]
111
+ CurrentLCID : 1033
112
+ CustomProperties : []
113
+ FriendlyUrlSegment :
114
+ IsDeleted : false
115
+ IsHidden : false
116
+ IsTitleForExistingLanguage: false
117
+ Key : 2209
118
+ NodeType : 0
119
+ Nodes : [{"AudienceIds":[],"CurrentLCID":1033,"CustomProperties":[],"FriendlyUrlSegment":"","IsDeleted":false,"IsHidden":false,"IsTitleForExistingLanguage":false,"Key":"2210","Nodes":[],"NodeType":0,"OpenInNewWindow":true,"SimpleUrl":"https://microsoft365.com","Title":"Microsoft 365","Translations":[]}]
120
+ OpenInNewWindow : null
121
+ SimpleUrl : /sites/Marketing/Lists/Work Status/AllItems.aspx
122
+ Title : Work Status
123
+ Translations : []
103
124
  ```
104
125
 
105
126
  </TabItem>
106
127
  <TabItem value="CSV">
107
128
 
108
129
  ```csv
109
- CurrentLCID,Id,IsDocLib,IsExternal,IsVisible,ListTemplateType,Title,Url
110
- 1033,2209,1,,1,100,Work Status,/sites/Marketing/Lists/Work Status/AllItems.aspx
130
+ CurrentLCID,FriendlyUrlSegment,IsDeleted,IsHidden,IsTitleForExistingLanguage,Key,NodeType,OpenInNewWindow,SimpleUrl,Title
131
+ 1033,,0,0,0,2209,0,,/sites/Marketing/Lists/Work Status/AllItems.aspx,Work Status
111
132
  ```
112
133
 
113
134
  </TabItem>
114
135
  <TabItem value="Markdown">
115
136
 
116
137
  ```md
117
- # spo navigation node get --webUrl "https://contoso.sharepoint.com/sites/Marketing" --id "2209"
138
+ # spo navigation node get --webUrl "https://contoso.sharepoint.com/sites/Marketing" --location "QuickLaunch" --id "2209"
118
139
 
119
- Date: 1/29/2023
140
+ Date: 10/7/2026
120
141
 
121
- ## Work Status (2209)
142
+ ## Work Status
122
143
 
123
144
  Property | Value
124
145
  ---------|-------
125
146
  CurrentLCID | 1033
126
- Id | 2209
127
- IsDocLib | true
128
- IsExternal | false
129
- IsVisible | true
130
- ListTemplateType | 100
147
+ FriendlyUrlSegment |
148
+ IsDeleted | false
149
+ IsHidden | false
150
+ IsTitleForExistingLanguage | false
151
+ Key | 2209
152
+ NodeType | 0
153
+ SimpleUrl | /sites/Marketing/Lists/Work Status/AllItems.aspx
131
154
  Title | Work Status
132
- Url | /sites/Marketing/Lists/Work Status/AllItems.aspx
133
155
  ```
134
156
 
135
157
  </TabItem>