@pnp/cli-microsoft365 10.5.0 → 10.6.0-beta.55e3c97

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.
@@ -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
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "10.5.0",
3
+ "version": "10.6.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@pnp/cli-microsoft365",
9
- "version": "10.5.0",
9
+ "version": "10.6.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@azure/msal-common": "^15.2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "10.5.0",
3
+ "version": "10.6.0-beta.55e3c97",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -312,4 +312,4 @@
312
312
  "sinon": "^19.0.2",
313
313
  "source-map-support": "^0.5.21"
314
314
  }
315
- }
315
+ }