@pnp/cli-microsoft365 10.5.0 → 10.6.0-beta.38233e7

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 (65) hide show
  1. package/.eslintrc.cjs +3 -1
  2. package/allCommands.json +1 -1
  3. package/allCommandsFull.json +1 -1
  4. package/dist/Auth.js +2 -1
  5. package/dist/Command.js +4 -26
  6. package/dist/auth/MsalNetworkClient.js +32 -0
  7. package/dist/config.js +2 -0
  8. package/dist/m365/adaptivecard/commands/adaptivecard-send.js +2 -1
  9. package/dist/m365/app/commands/app-get.js +3 -13
  10. package/dist/m365/app/commands/permission/permission-list.js +4 -14
  11. package/dist/m365/base/SpoCommand.js +2 -1
  12. package/dist/m365/commands/request.js +3 -12
  13. package/dist/m365/commands/setup.js +2 -0
  14. package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +10 -5
  15. package/dist/m365/entra/commands/app/app-add.js +5 -0
  16. package/dist/m365/entra/commands/app/app-get.js +27 -21
  17. package/dist/m365/entra/commands/app/app-permission-list.js +28 -22
  18. package/dist/m365/entra/commands/app/app-remove.js +22 -19
  19. package/dist/m365/entra/commands/app/app-role-add.js +22 -19
  20. package/dist/m365/entra/commands/app/app-role-list.js +22 -19
  21. package/dist/m365/entra/commands/app/app-role-remove.js +39 -36
  22. package/dist/m365/entra/commands/app/app-set.js +45 -19
  23. package/dist/m365/entra/commands/group/group-add.js +1 -0
  24. package/dist/m365/entra/commands/group/group-set.js +12 -6
  25. package/dist/m365/entra/commands/policy/policy-list.js +46 -3
  26. package/dist/m365/entra/commands/user/user-add.js +1 -0
  27. package/dist/m365/entra/commands/user/user-list.js +2 -1
  28. package/dist/m365/external/commands/item/item-add.js +2 -1
  29. package/dist/m365/flow/commands/flow-list.js +1 -1
  30. package/dist/m365/graph/commands/openextension/openextension-add.js +73 -0
  31. package/dist/m365/graph/commands/openextension/openextension-get.js +57 -0
  32. package/dist/m365/graph/commands/openextension/openextension-list.js +62 -0
  33. package/dist/m365/graph/commands/openextension/openextension-remove.js +68 -0
  34. package/dist/m365/graph/commands.js +4 -0
  35. package/dist/m365/pp/commands/card/card-clone.js +12 -16
  36. package/dist/m365/pp/commands/card/card-get.js +13 -19
  37. package/dist/m365/pp/commands/card/card-remove.js +13 -16
  38. package/dist/m365/pp/commands/solution/solution-get.js +5 -11
  39. package/dist/m365/pp/commands/solution/solution-publish.js +6 -16
  40. package/dist/m365/pp/commands/solution/solution-remove.js +4 -13
  41. package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +12 -47
  42. package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +13 -31
  43. package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +12 -43
  44. package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +8 -27
  45. package/dist/m365/spo/commands/web/web-roleassignment-add.js +22 -47
  46. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +17 -32
  47. package/dist/m365/tenant/commands/people/people-profilecardproperty-add.js +4 -3
  48. package/dist/m365/tenant/commands/people/people-profilecardproperty-set.js +4 -3
  49. package/dist/m365/todo/commands/list/list-remove.js +1 -1
  50. package/dist/m365/util/commands/accesstoken/accesstoken-get.js +13 -3
  51. package/dist/utils/accessToken.js +8 -0
  52. package/dist/utils/entraApp.js +3 -1
  53. package/dist/utils/optionsUtils.js +28 -0
  54. package/dist/utils/powerPlatform.js +51 -1
  55. package/dist/utils/spo.js +32 -3
  56. package/docs/docs/cmd/entra/policy/policy-list.mdx +1 -1
  57. package/docs/docs/cmd/graph/directoryextension/directoryextension-get.mdx +2 -3
  58. package/docs/docs/cmd/graph/openextension/openextension-add.mdx +120 -0
  59. package/docs/docs/cmd/graph/openextension/openextension-get.mdx +111 -0
  60. package/docs/docs/cmd/graph/openextension/openextension-list.mdx +129 -0
  61. package/docs/docs/cmd/graph/openextension/openextension-remove.mdx +59 -0
  62. package/docs/docs/cmd/spfx/project/project-upgrade.mdx +0 -3
  63. package/docs/docs/cmd/util/accesstoken/accesstoken-get.mdx +72 -0
  64. package/npm-shrinkwrap.json +517 -481
  65. package/package.json +15 -15
package/dist/utils/spo.js CHANGED
@@ -519,10 +519,11 @@ export const spo = {
519
519
  },
520
520
  /**
521
521
  * Retrieves the spo user by email.
522
+ * Returns a user object
522
523
  * @param webUrl Web url
523
524
  * @param email The email of the user
524
525
  * @param logger the Logger object
525
- * @param verbose set for verbose logging
526
+ * @param verbose Set for verbose logging
526
527
  */
527
528
  async getUserByEmail(webUrl, email, logger, verbose) {
528
529
  if (verbose && logger) {
@@ -593,10 +594,11 @@ export const spo = {
593
594
  },
594
595
  /**
595
596
  * Retrieves the spo group by name.
597
+ * Returns a group object
596
598
  * @param webUrl Web url
597
599
  * @param name The name of the group
598
600
  * @param logger the Logger object
599
- * @param verbose set for verbose logging
601
+ * @param verbose Set for verbose logging
600
602
  */
601
603
  async getGroupByName(webUrl, name, logger, verbose) {
602
604
  if (verbose && logger) {
@@ -615,10 +617,13 @@ export const spo = {
615
617
  },
616
618
  /**
617
619
  * Retrieves the role definition by name.
620
+ * Returns a RoleDefinition object
621
+ * Returns a RoleDefinition object
618
622
  * @param webUrl Web url
619
623
  * @param name the name of the role definition
620
624
  * @param logger the Logger object
621
- * @param verbose set for verbose logging
625
+ * @param verbose Set for verbose logging
626
+ * @param verbose Set for verbose logging
622
627
  */
623
628
  async getRoleDefinitionByName(webUrl, name, logger, verbose) {
624
629
  if (verbose && logger) {
@@ -1753,6 +1758,30 @@ export const spo = {
1753
1758
  responseType: 'json'
1754
1759
  };
1755
1760
  return request.post(requestOptions);
1761
+ },
1762
+ /**
1763
+ * Get a role definition by name
1764
+ * Returns a RoleDefinition object
1765
+ * @param webUrl The web url
1766
+ * @param name the name of the role definition
1767
+ * @param logger The logger object
1768
+ * @param verbose Set for verbose logging
1769
+ */
1770
+ async getRoleDefintionByName(webUrl, name, logger, verbose) {
1771
+ if (verbose && logger) {
1772
+ await logger.logToStderr(`Retrieving the role definition by name ${name}`);
1773
+ }
1774
+ const response = await odata.getAllItems(`${webUrl}/_api/web/roledefinitions`);
1775
+ const roleDefinition = response.find((role) => role.Name === name);
1776
+ if (!roleDefinition) {
1777
+ throw new Error(`The specified role definition name '${name}' does not exist.`);
1778
+ }
1779
+ const permissions = new BasePermissions();
1780
+ permissions.high = roleDefinition.BasePermissions.High;
1781
+ permissions.low = roleDefinition.BasePermissions.Low;
1782
+ roleDefinition.BasePermissionsValue = permissions.parse();
1783
+ roleDefinition.RoleTypeKindValue = RoleType[roleDefinition.RoleTypeKind];
1784
+ return roleDefinition;
1756
1785
  }
1757
1786
  };
1758
1787
  //# sourceMappingURL=spo.js.map
@@ -16,7 +16,7 @@ m365 entra policy list [options]
16
16
 
17
17
  ```md definition-list
18
18
  `-t, --type [type]`
19
- : The type of policies to return. Allowed values `activityBasedTimeout`, `authorization`, `claimsMapping`, `homeRealmDiscovery`, `identitySecurityDefaultsEnforcement`, `tokenIssuance`, `tokenLifetime`. If omitted, all policies are returned.
19
+ : The type of policies to return. Allowed values `activityBasedTimeout`, `adminConsentRequest`, `appManagement`, `authenticationFlows`, `authenticationMethods`, `authenticationStrength`, `authorization`, `claimsMapping`, `conditionalAccess`, `crossTenantAccess`, `defaultAppManagement`, `deviceRegistration`, `featureRolloutPolicy`, `homeRealmDiscovery`, `identitySecurityDefaultsEnforcement`, `permissionGrant`, `roleManagement`, `tokenIssuance`, `tokenLifetime`. If omitted, all policies are returned.
20
20
  ```
21
21
 
22
22
  <Global />
@@ -38,16 +38,15 @@ m365 graph directoryextension get [options]
38
38
  Get directory extension by id registered for an application specified by app id.
39
39
 
40
40
  ```sh
41
- m365 directoryextension get --id 1f0f15e3-925d-40f0-8fc8-9d3ad135bce0 --appId fd918e4b-c821-4efb-b50a-5eddd23afc6f
41
+ m365 graph directoryextension get --id 1f0f15e3-925d-40f0-8fc8-9d3ad135bce0 --appId fd918e4b-c821-4efb-b50a-5eddd23afc6f
42
42
  ```
43
43
 
44
44
  Get directory extension by name registered for an application specified by name.
45
45
 
46
46
  ```sh
47
- m365 directoryextension get --name extension_105be60b603845fea385e58772d9d630_GitHubWorkAccount --appName ContosoApp
47
+ m365 graph directoryextension get --name extension_105be60b603845fea385e58772d9d630_GitHubWorkAccount --appName ContosoApp
48
48
  ```
49
49
 
50
-
51
50
  ## Response
52
51
 
53
52
  <Tabs>
@@ -0,0 +1,120 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # graph openextension add
6
+
7
+ Adds an open extension to a resource
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 graph openextension add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-n, --name <name>`
19
+ : The name of the open extension.
20
+
21
+ `-i, --resourceId <resourceId>`
22
+ : The Id of the resource for which the extension is created.
23
+
24
+ `-t, --resourceType <resourceType>`
25
+ : The resource type for which the extension is created. Allowed values are `user`, `group`, `device`, `organization`.
26
+ ```
27
+
28
+ <Global />
29
+
30
+ ## Remarks
31
+
32
+ This command allows using unknown options to add custom data to the open extension.
33
+
34
+ When adding an open extension to a user, it's possible to use the UPN as the resourceId.
35
+
36
+ :::warning[Escaping JSON in PowerShell]
37
+
38
+ When creating open extensions it's possible to enter a JSON string. In PowerShell 5 to 7.2 [specific escaping rules](./../../../user-guide/using-cli.mdx#escaping-double-quotes-in-powershell) apply due to an issue. Remember that you can also use [file tokens](./../../../user-guide/using-cli.mdx#passing-complex-content-into-cli-options) instead.
39
+
40
+ :::
41
+
42
+ ## Examples
43
+
44
+ Create a new open extension for a user specified by id. Extension properties are specified by unknown options.
45
+
46
+ ```sh
47
+ m365 graph openextension add --resourceId eb77fbcf-6fe8-458b-985d-1747284793bc --resourceType user --name 'com.contoso.roamingSettings' --theme dark --color red --language English
48
+ ```
49
+
50
+ Create a new open extension for a user specified by userName. Extension properties are specified by unknown options.
51
+
52
+ ```sh
53
+ m365 graph openextension add --resourceId adelev@contoso.com --resourceType user --name 'com.contoso.roamingSettings' --theme dark --color red --language English
54
+ ```
55
+
56
+ Create a new open extension for a group, one of the property represents a JSON object
57
+
58
+ ```sh
59
+ m365 graph openextension add --resourceId eb77fbcf-6fe8-458b-985d-1747284793bc --resourceType group --name 'com.contoso.roamingSettings' --settings '{"theme": "dark", "color": "red", "language": "English"}' --supportedSystem 'Linux'
60
+ ```
61
+
62
+ ## Response
63
+
64
+ <Tabs>
65
+ <TabItem value="JSON">
66
+
67
+ ```json
68
+ {
69
+ "extensionName": "com.contoso.roamingSettings",
70
+ "settings": {
71
+ "theme": "dark",
72
+ "color": "red",
73
+ "language": "English"
74
+ },
75
+ "supportedSystem": "Linux",
76
+ "id": "com.contoso.roamingSettings"
77
+ }
78
+ ```
79
+
80
+ </TabItem>
81
+ <TabItem value="Text">
82
+
83
+ ```text
84
+ extensionName : com.contoso.roamingSettings
85
+ id : com.contoso.roamingSettings
86
+ settings : {"theme":"dark","color":"red","language":"English"}
87
+ supportedSystem: Linux
88
+ ```
89
+
90
+ </TabItem>
91
+ <TabItem value="CSV">
92
+
93
+ ```csv
94
+ extensionName,supportedSystem,id
95
+ com.contoso.roamingSettings,Linux,com.contoso.roamingSettings
96
+ ```
97
+
98
+ </TabItem>
99
+ <TabItem value="Markdown">
100
+
101
+ ```md
102
+ # graph openextension add --name "com.contoso.roamingSettings" --resourceId "01b62bc5-9701-4f93-9587-9d1ea58a086d" --resourceType "user" --settings "{"theme": "dark", "color": "red", "language": "English"}" --supportedSystem "Linux"
103
+
104
+ Date: 3/13/2025
105
+
106
+ ## com.contoso.roamingSettings
107
+
108
+ Property | Value
109
+ ---------|-------
110
+ extensionName | com.contoso.roamingSettings
111
+ supportedSystem | Linux
112
+ id | com.contoso.roamingSettings
113
+ ```
114
+
115
+ </TabItem>
116
+ </Tabs>
117
+
118
+ ## More information
119
+
120
+ - Open extensions: https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension
@@ -0,0 +1,111 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # graph openextension get
6
+
7
+ Retrieves a specific open extension for a resource
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 graph openextension get [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-n, --name <name>`
19
+ : The name of the open extension to retrieve.
20
+
21
+ `-i, --resourceId <resourceId>`
22
+ : The Id of the resource for which to retrieve the open extension.
23
+
24
+ `-t, --resourceType <resourceType>`
25
+ : The type of resource. Allowed values are `user`, `group`, `device`, `organization`.
26
+ ```
27
+
28
+ <Global />
29
+
30
+ ## Examples
31
+
32
+ Retrieve a specified open extension for a user specified by id.
33
+
34
+ ```sh
35
+ m365 graph openextension get --resourceId eb77fbcf-6fe8-458b-985d-1747284793bc --name 'com.contoso.roamingSettings' --resourceType user
36
+ ```
37
+
38
+ Retrieve a specified open extension for a user specified by UPN.
39
+
40
+ ```sh
41
+ m365 graph openextension get --resourceId john.doe@contoso.com --name 'com.contoso.roamingSettings' --resourceType user
42
+ ```
43
+
44
+ ## Response
45
+
46
+ <Tabs>
47
+ <TabItem value="JSON">
48
+
49
+ ```json
50
+ {
51
+ "extensionName": "com.contoso.roamingSettings",
52
+ "name": "com.contoso.roamingSettings",
53
+ "resourceId": "john.doe@contoso.com",
54
+ "resourceType": "user",
55
+ "theme": "dark",
56
+ "color": "red",
57
+ "language": "English",
58
+ "id": "com.contoso.roamingSettings"
59
+ }
60
+ ```
61
+
62
+ </TabItem>
63
+ <TabItem value="Text">
64
+
65
+ ```text
66
+ color : red
67
+ extensionName: com.contoso.roamingSettings
68
+ id : com.contoso.roamingSettings
69
+ language : English
70
+ name : com.contoso.roamingSettings
71
+ resourceId : john.doe@contoso.com
72
+ resourceType : user
73
+ theme : dark
74
+ ```
75
+
76
+ </TabItem>
77
+ <TabItem value="CSV">
78
+
79
+ ```csv
80
+ extensionName,name,resourceId,resourceType,theme,color,language,id
81
+ com.contoso.roamingSettings,com.contoso.roamingSettings,john.doe@contoso.com,user,dark,red,English,com.contoso.roamingSettings
82
+ ```
83
+
84
+ </TabItem>
85
+ <TabItem value="Markdown">
86
+
87
+ ```md
88
+ # graph openextension get --debug "false" --verbose "false" --resourceId "john.doe@contoso.com" --resourceType "user" --name "com.contoso.roamingSettings"
89
+
90
+ Date: 2025-04-07
91
+
92
+ ## com.contoso.roamingSettings (com.contoso.roamingSettings)
93
+
94
+ Property | Value
95
+ ---------|-------
96
+ extensionName | com.contoso.roamingSettings
97
+ name | com.contoso.roamingSettings
98
+ resourceId | john.doe@contoso.com
99
+ resourceType | user
100
+ theme | dark
101
+ color | red
102
+ language | English
103
+ id | com.contoso.roamingSettings
104
+ ```
105
+
106
+ </TabItem>
107
+ </Tabs>
108
+
109
+ ## More information
110
+
111
+ - Open extensions: https://learn.microsoft.com/graph/extensibility-overview?tabs=http#open-extensions
@@ -0,0 +1,129 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # graph openextension list
6
+
7
+ Retrieves all open extensions for a resource
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 graph openextension list [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --resourceId <resourceId>`
19
+ : The Id of the resource for which to retrieve open extensions.
20
+
21
+ `-t, --resourceType <resourceType>`
22
+ : The type of resource. Allowed values are `user`, `group`, `device`, `organization`.
23
+ ```
24
+
25
+ <Global />
26
+
27
+ ## Examples
28
+
29
+ Retrieve open extensions for a user specified by id
30
+
31
+ ```sh
32
+ m365 graph openextension list --resourceId eb77fbcf-6fe8-458b-985d-1747284793bc --resourceType user
33
+ ```
34
+
35
+ Retrieve open extensions for a user specified by UPN
36
+
37
+ ```sh
38
+ m365 graph openextension list --resourceId john.doe@contoso.com --resourceType user
39
+ ```
40
+
41
+ Retrieve open extensions for a group specified by id
42
+
43
+ ```sh
44
+ m365 graph openextension list --resourceId 19588303-70bf-44a4-beb1-e2f0f1ed06b3 --resourceType group
45
+ ```
46
+
47
+ Retrieve open extensions for an organization specified by id
48
+
49
+ ```sh
50
+ m365 graph openextension list --resourceId c956e711-f074-40c3-8431-fbd69bb67d9c --resourceType organization
51
+ ```
52
+
53
+ ## Response
54
+
55
+ <Tabs>
56
+ <TabItem value="JSON">
57
+
58
+ ```json
59
+ [
60
+ {
61
+ "extensionName": "com.contoso.roamingSettings",
62
+ "theme": "dark",
63
+ "color": "purple",
64
+ "lang": "Japanese",
65
+ "id": "com.contoso.roamingSettings"
66
+ },
67
+ {
68
+ "extensionName": "com.test.m365",
69
+ "settings": {
70
+ "theme": "dark"
71
+ },
72
+ "supportedSystem": "Linux",
73
+ "id": "com.test.m365"
74
+ }
75
+ ]
76
+ ```
77
+
78
+ </TabItem>
79
+ <TabItem value="Text">
80
+
81
+ ```text
82
+ extensionName id
83
+ --------------------------- ---------------------------
84
+ com.contoso.roamingSettings com.contoso.roamingSettings
85
+ com.test.m365 com.test.m365
86
+ ```
87
+
88
+ </TabItem>
89
+ <TabItem value="CSV">
90
+
91
+ ```csv
92
+ extensionName,theme,color,lang,id
93
+ com.contoso.roamingSettings,dark,purple,Japanese,com.contoso.roamingSettings
94
+ com.test.m365,,,,com.test.m365
95
+ ```
96
+
97
+ </TabItem>
98
+ <TabItem value="Markdown">
99
+
100
+ ```md
101
+ # graph openextension list --resourceId "eb77fbcf-6fe8-458b-985d-1747284793bc" --resourceType "user"
102
+
103
+ Date: 3/29/2025
104
+
105
+ ## com.contoso.roamingSettings
106
+
107
+ Property | Value
108
+ ---------|-------
109
+ extensionName | com.contoso.roamingSettings
110
+ theme | dark
111
+ color | purple
112
+ lang | Japanese
113
+ id | com.contoso.roamingSettings
114
+
115
+ ## com.test.m365
116
+
117
+ Property | Value
118
+ ---------|-------
119
+ extensionName | com.test.m365
120
+ supportedSystem | Linux
121
+ id | com.test.m365
122
+ ```
123
+
124
+ </TabItem>
125
+ </Tabs>
126
+
127
+ ## More information
128
+
129
+ - Open extensions: https://learn.microsoft.com/graph/extensibility-overview?tabs=http#open-extensions
@@ -0,0 +1,59 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # graph openextension remove
6
+
7
+ Removes a specific open extension for a resource
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 graph openextension remove [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-n, --name <name>`
19
+ : The name of the open extension to remove.
20
+
21
+ `-i, --resourceId <resourceId>`
22
+ : The Id of the resource for which to remove the open extension.
23
+
24
+ `-t, --resourceType <resourceType>`
25
+ : The type of resource. Allowed values are `user`, `group`, `device`, `organization`.
26
+
27
+ `-f, --force`
28
+ : Don't prompt for confirmation.
29
+ ```
30
+
31
+ <Global />
32
+
33
+ ## Examples
34
+
35
+ Remove a specified open extension for a user specified by id.
36
+
37
+ ```sh
38
+ m365 graph openextension remove --resourceId eb77fbcf-6fe8-458b-985d-1747284793bc --name 'com.contoso.roamingSettings' --resourceType user
39
+ ```
40
+
41
+ Remove a specified open extension for a user specified by UPN without confirmation prompt.
42
+
43
+ ```sh
44
+ m365 graph openextension remove --resourceId john.doe@contoso.com --name 'com.contoso.roamingSettings' --resourceType user --force
45
+ ```
46
+
47
+ Remove a specified open extension for a group specified by id.
48
+
49
+ ```sh
50
+ m365 graph openextension remove --resourceId c956e711-f074-40c3-8431-fbd69bb67d9c --name 'com.contoso.groupSettings' --resourceType group
51
+ ```
52
+
53
+ ## Response
54
+
55
+ The command won't return a response on success.
56
+
57
+ ## More information
58
+
59
+ - Open extensions: https://learn.microsoft.com/graph/extensibility-overview?tabs=http#open-extensions
@@ -26,9 +26,6 @@ m365 spfx project upgrade [options]
26
26
 
27
27
  `--preview`
28
28
  : Upgrade project to the latest SPFx preview version
29
-
30
- `--outputFile [outputFile]`
31
- : Path to the file where the upgrade report should be stored in. Ignored when `output` is `tour`
32
29
  ```
33
30
 
34
31
  <Global />
@@ -20,6 +20,9 @@ m365 util accesstoken get [options]
20
20
 
21
21
  `--new`
22
22
  : Retrieve a new access token to ensure that it's valid for as long as possible
23
+
24
+ `--decoded`
25
+ : Retrieve a decoded access token
23
26
  ```
24
27
 
25
28
  <Global />
@@ -60,8 +63,16 @@ Get a new access token for SharePoint Online
60
63
  m365 util accesstoken get --resource https://contoso.sharepoint.com --new
61
64
  ```
62
65
 
66
+ Get a decoded access token for SharePoint Online
67
+
68
+ ```sh
69
+ m365 util accesstoken get --resource https://contoso.sharepoint.com --decoded
70
+ ```
71
+
63
72
  ## Response
64
73
 
74
+ ### Standard response
75
+
65
76
  <Tabs>
66
77
  <TabItem value="JSON">
67
78
 
@@ -93,3 +104,64 @@ m365 util accesstoken get --resource https://contoso.sharepoint.com --new
93
104
  </TabItem>
94
105
  </Tabs>
95
106
 
107
+ ### `decoded` response
108
+
109
+ <Tabs>
110
+ <TabItem value="JSON">
111
+
112
+ ```json
113
+ {
114
+ "alg": "HS256",
115
+ "typ": "JWT"
116
+ }.{
117
+ "sub": "1234567890",
118
+ "name": "John Doe",
119
+ "iat": 1516239022
120
+ }.[signature]
121
+ ```
122
+
123
+ </TabItem>
124
+ <TabItem value="Text">
125
+
126
+ ```text
127
+ {
128
+ "alg": "HS256",
129
+ "typ": "JWT"
130
+ }.{
131
+ "sub": "1234567890",
132
+ "name": "John Doe",
133
+ "iat": 1516239022
134
+ }.[signature]
135
+ ```
136
+
137
+ </TabItem>
138
+ <TabItem value="CSV">
139
+
140
+ ```csv
141
+ {
142
+ "alg": "HS256",
143
+ "typ": "JWT"
144
+ }.{
145
+ "sub": "1234567890",
146
+ "name": "John Doe",
147
+ "iat": 1516239022
148
+ }.[signature]
149
+ ```
150
+
151
+ </TabItem>
152
+ <TabItem value="Markdown">
153
+
154
+ ```md
155
+ {
156
+ "alg": "HS256",
157
+ "typ": "JWT"
158
+ }.{
159
+ "sub": "1234567890",
160
+ "name": "John Doe",
161
+ "iat": 1516239022
162
+ }.[signature]
163
+ ```
164
+
165
+ </TabItem>
166
+ </Tabs>
167
+