@pnp/cli-microsoft365 10.6.0-beta.36bb898 → 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.
- package/.eslintrc.cjs +3 -1
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Command.js +4 -26
- package/dist/config.js +1 -0
- package/dist/m365/adaptivecard/commands/adaptivecard-send.js +2 -1
- package/dist/m365/base/SpoCommand.js +2 -1
- package/dist/m365/commands/request.js +3 -12
- package/dist/m365/commands/setup.js +2 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +10 -5
- package/dist/m365/entra/commands/app/app-add.js +5 -0
- package/dist/m365/entra/commands/app/app-set.js +23 -0
- package/dist/m365/entra/commands/group/group-add.js +1 -0
- package/dist/m365/entra/commands/group/group-set.js +12 -6
- package/dist/m365/entra/commands/user/user-add.js +1 -0
- package/dist/m365/entra/commands/user/user-list.js +2 -1
- package/dist/m365/external/commands/item/item-add.js +2 -1
- package/dist/m365/graph/commands/openextension/openextension-add.js +73 -0
- package/dist/m365/graph/commands.js +1 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-add.js +4 -3
- package/dist/m365/tenant/commands/people/people-profilecardproperty-set.js +4 -3
- package/dist/m365/todo/commands/list/list-remove.js +1 -1
- package/dist/utils/entraApp.js +3 -1
- package/dist/utils/optionsUtils.js +28 -0
- package/docs/docs/cmd/graph/directoryextension/directoryextension-get.mdx +2 -3
- package/docs/docs/cmd/graph/openextension/openextension-add.mdx +120 -0
- package/package.json +1 -1
|
@@ -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
|
package/package.json
CHANGED