@pnp/cli-microsoft365 7.2.0 → 7.3.0-beta.16c6462

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/dist/telemetry.js CHANGED
@@ -29,14 +29,6 @@ export const telemetry = {
29
29
  commandName,
30
30
  properties
31
31
  });
32
- },
33
- trackException: (exception) => {
34
- if (Cli.getInstance().getSettingWithDefaultValue(settingsNames.disableTelemetry, false)) {
35
- return;
36
- }
37
- trackTelemetry({
38
- exception
39
- });
40
32
  }
41
33
  };
42
34
  //# sourceMappingURL=telemetry.js.map
@@ -0,0 +1,179 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+
3
+ # external connection doctor
4
+
5
+ Checks if the external connection is correctly configured for use with a specified user experience in Microsoft 365
6
+
7
+ ## Usage
8
+
9
+ ```sh
10
+ m365 external connection doctor [options]
11
+ ```
12
+
13
+ ## Options
14
+
15
+ ```md definition-list
16
+ `-i, --id <id>`
17
+ : The ID of the external connection to check.
18
+
19
+ `--ux [ux]`
20
+ : Microsoft 365 experience for which to check compatibility. Allowed values `copilot`, `search`, `all` (default)
21
+
22
+ <Global />
23
+
24
+ ## Remarks
25
+
26
+ The `external connection doctor` command runs several automated checks to verify if an external connection is correctly configured for use with a user experience in Microsoft 365.
27
+
28
+ Check|ID|UX|Type|Description
29
+ -----|--|:--:|--|------------
30
+ Required semantic labels|`copilotRequiredSemanticLabels`|Copilot|Required|Checks if the external connection schema has the required semantic labels configured: `title`, `url` and `iconUrl`
31
+ Searchable properties|Copilot|`searchableProperties`|Required|Checks if the external connection schema has at least one searchable property
32
+ Items have content ingested|`contentIngested`|Copilot|Required|Checks if external items have content ingested
33
+ Connection configured for inline results|`enabledForInlineResults`|Copilot|Required (manual)|Check if the external connection is configured for inline results
34
+ Items have activities recorded|`itemsHaveActivities`|Copilot|Recommended (manual)|Check if external items have activities recorded
35
+ Meaningful connection name and description|`meaningfulNameAndDescription`|Copilot|Required (manual)|Check if the external connection has a meaningful name and description
36
+ Semantic labels|`semanticLabels`|Search|Recommended|Checks if the external connection schema uses semantic labels
37
+ Searchable properties|`searchableProperties`|Search|Recommended|Checks if the external connection schema has at least one searchable property
38
+ Result types|`resultType`|Search|Recommended|Checks if the external connection has a result type configured
39
+ Items have content ingested|`contentIngested`|Search|Recommended|Checks if external items have content ingested
40
+ Items have activities recorded|`itemsHaveActivities`|Search|Recommended|Check if external items have activities recorded
41
+ urlToItemResolver configured|`urlToItemResolver`|All|Recommended|Checks if the external connection has at least one urlToItemResolver configured
42
+
43
+ Required checks must pass for the external connection to be compatible with the specified user experience. Recommended checks are optional, but recommended for optimal user experience.
44
+
45
+ Some checks must be done manually, because there are no APIs available to verify the configuration automatically.
46
+
47
+ When you check the compatibility with all UXs, and there are multiple checks with the same ID, the command will use the first matching check, following the order listed above.
48
+
49
+ ## Examples
50
+
51
+ Checks if the external connection with the specified ID is correctly configured for use with Copilot for Microsoft 365.
52
+
53
+ ```sh
54
+ m365 external connection doctor --id contosoproducts --ux copilot
55
+ ```
56
+
57
+ ## Response
58
+
59
+ <Tabs>
60
+ <TabItem value="JSON">
61
+
62
+ ```json
63
+ [
64
+ {
65
+ "id": "loadExternalConnection",
66
+ "text": "Load connection",
67
+ "type": "required",
68
+ "status": "passed"
69
+ },
70
+ {
71
+ "id": "loadSchema",
72
+ "text": "Load schema",
73
+ "type": "required",
74
+ "status": "passed"
75
+ },
76
+ {
77
+ "id": "copilotRequiredSemanticLabels",
78
+ "text": "Required semantic labels",
79
+ "type": "required",
80
+ "errorMessage": "Missing label iconUrl",
81
+ "status": "failed"
82
+ },
83
+ {
84
+ "id": "searchableProperties",
85
+ "text": "Searchable properties",
86
+ "type": "required",
87
+ "status": "passed"
88
+ },
89
+ {
90
+ "id": "contentIngested",
91
+ "text": "Items have content ingested",
92
+ "type": "required",
93
+ "status": "passed"
94
+ },
95
+ {
96
+ "id": "enabledForInlineResults",
97
+ "text": "Connection configured for inline results",
98
+ "type": "required",
99
+ "status": "manual"
100
+ },
101
+ {
102
+ "id": "itemsHaveActivities",
103
+ "text": "Items have activities recorded",
104
+ "type": "recommended",
105
+ "status": "manual"
106
+ },
107
+ {
108
+ "id": "meaningfulNameAndDescription",
109
+ "text": "Meaningful connection name and description",
110
+ "type": "required",
111
+ "status": "manual"
112
+ },
113
+ {
114
+ "id": "urlToItemResolver",
115
+ "text": "urlToItemResolver configured",
116
+ "type": "recommended",
117
+ "status": "passed"
118
+ }
119
+ ]
120
+ ```
121
+
122
+ </TabItem>
123
+ <TabItem value="Text">
124
+
125
+ ```text
126
+ ✔ Load connection
127
+ ✔ Load schema
128
+ ✖ Required semantic labels: Missing label iconUrl
129
+ ✔ Searchable properties
130
+ ✔ Items have content ingested
131
+ ℹ Connection configured for inline results (manual)
132
+ ℹ Items have activities recorded (manual)
133
+ ℹ Meaningful connection name and description (manual)
134
+ ✔ urlToItemResolver configured
135
+ ```
136
+
137
+ </TabItem>
138
+ <TabItem value="CSV">
139
+
140
+ ```csv
141
+ id,text,type,status,errorMessage
142
+ loadExternalConnection,Load connection,required,passed,
143
+ loadSchema,Load schema,required,passed,
144
+ copilotRequiredSemanticLabels,Required semantic labels,required,failed,Missing label iconUrl
145
+ searchableProperties,Searchable properties,required,passed,
146
+ contentIngested,Items have content ingested,required,passed,
147
+ enabledForInlineResults,Connection configured for inline results,required,manual,
148
+ itemsHaveActivities,Items have activities recorded,recommended,manual,
149
+ meaningfulNameAndDescription,Meaningful connection name and description,required,manual,
150
+ urlToItemResolver,urlToItemResolver configured,recommended,passed,
151
+ ```
152
+
153
+ </TabItem>
154
+ <TabItem value="Markdown">
155
+
156
+ ```md
157
+ # external connection doctor --id "msgraphdocs" --ux "copilot"
158
+
159
+ Date: 11/23/2023
160
+
161
+ Check|Type|Status|Error message
162
+ :----|:--:|:----:|:------------
163
+ Load connection|required|passed|
164
+ Load schema|required|passed|
165
+ Required semantic labels|required|failed|Missing label iconUrl
166
+ Searchable properties|required|passed|
167
+ Items have content ingested|required|passed|
168
+ Connection configured for inline results|required|manual|
169
+ Items have activities recorded|recommended|manual|
170
+ Meaningful connection name and description|required|manual|
171
+ urlToItemResolver configured|recommended|passed|
172
+ ```
173
+
174
+ </TabItem>
175
+ </Tabs>
176
+
177
+ ## More information
178
+
179
+ - Microsoft Graph connector experiences: [https://learn.microsoft.com/graph/connecting-external-content-experiences](https://learn.microsoft.com/graph/connecting-external-content-experiences)
@@ -0,0 +1,145 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # external item add
6
+
7
+ Creates external item
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 external item add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --id <id>`
19
+ : The ID of the item to create
20
+
21
+ `--externalConnectionId <name>`
22
+ : The ID of the external connection on which to create the item
23
+
24
+ `--content <content>`
25
+ : External item content
26
+
27
+ `--contentType [contentType]`
28
+ : Type of content to load. Allowed values: `text` (default), `html`
29
+
30
+ `--acls <acls>`
31
+ : List of permissions to set on the item, in the format `accessType1,type1,value1;accessType2,type2,value2`, eg. `grant,everyone,everyone`
32
+ ```
33
+ <Global />
34
+
35
+ ## Remarks
36
+
37
+ When creating an external item, the options you specify will map to the external item properties, eg. `--author "Steve"` will set the `author` property of the external item to `Steve`.
38
+
39
+ If in your schema you have a multi-value property, to specify its value you need two things:
40
+
41
+ - you need to separate multiple values using `;#`, eg. `--author "Steve;#Bill"`
42
+ - you need to specify the type of the property as defined in the schema, eg. `--author@odata.type "Collection(String)"`
43
+
44
+ When creating items you can specify one or more permissions that define who can access the external item. The format of the permissions is `accessType1,type1,value1;accessType2,type2,value2`, eg. `grant,everyone,everyone`.
45
+
46
+ You can use the following access types:
47
+
48
+ - `grant` - grants access to the specified users or groups
49
+ - `deny` - denies access to the specified users or groups
50
+
51
+ You can use the following types:
52
+
53
+ - `everyone` - everyone
54
+ - `group` - an Entra group
55
+ - `user` - an Entra user
56
+ - `everyoneExceptGuests` - everyone except external users
57
+ - `externalGroup` - a group defined in the external system from which you're importing the content
58
+
59
+ For more information about using these options, see the Microsoft Graph API documentation and documentation about Microsoft Graph connectors.
60
+
61
+ ## Examples
62
+
63
+ Creates an external item with simple properties that everyone is allowed to access
64
+
65
+ ```sh
66
+ m365 external item add --id "pnp-ensure-siteassets-library" --connectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors "Phil Harding" --acls "grant,everyone,everyone"
67
+ ```
68
+
69
+ Creates an external item with multi-value properties accessible only to users from the specified Entra group
70
+
71
+ ```sh
72
+ m365 external item add --id "pnp-ensure-siteassets-library" --connectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors@odata.type "Collection(String)" --authors "Phil Harding;#Steve Smith" --acls "grant,group,Super users"
73
+ ```
74
+
75
+ ## Response
76
+
77
+ <Tabs>
78
+ <TabItem value="JSON">
79
+
80
+ ```json
81
+ {
82
+ "id": "pnp-ensure-siteassets-library",
83
+ "acl": [
84
+ {
85
+ "type": "everyone",
86
+ "value": "everyone",
87
+ "accessType": "grant"
88
+ }
89
+ ],
90
+ "properties": {
91
+ "title": "Ensure the Site Assets Library is created",
92
+ "description": "Ensure that the Site Assets library is created.",
93
+ "authors": "Phil Harding"
94
+ },
95
+ "content": {
96
+ "value": "Ensure that the Site Assets library is created.",
97
+ "type": "text"
98
+ },
99
+ "activities": []
100
+ }
101
+ ```
102
+
103
+ </TabItem>
104
+ <TabItem value="Text">
105
+
106
+ ```text
107
+ acl : [{"type":"everyone","value":"everyone","accessType":"grant"}]
108
+ activities: []
109
+ content : {"value":"Ensure that the Site Assets library is created.","type":"text"}
110
+ id : pnp-ensure-siteassets-library
111
+ properties: {"title":"Ensure the Site Assets Library is created","description":"Ensure that the Site Assets library is created.","authors":"Phil Harding"}
112
+ ```
113
+
114
+ </TabItem>
115
+ <TabItem value="CSV">
116
+
117
+ ```csv
118
+ id
119
+ pnp-ensure-siteassets-library
120
+ ```
121
+
122
+ </TabItem>
123
+ <TabItem value="Markdown">
124
+
125
+ ```md
126
+ # m365 external item add --id "pnp-ensure-siteassets-library" --connectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors "Phil Harding" --acls "grant,everyone,everyone"
127
+
128
+ Date: 2023-10-28
129
+
130
+ ## pnp-ensure-siteassets-library
131
+
132
+ Property | Value
133
+ ---------|-------
134
+ id | pnp-ensure-siteassets-library
135
+ ```
136
+
137
+ </TabItem>
138
+ </Tabs>
139
+
140
+ ## More information
141
+
142
+ - Microsoft Graph connectors access control list [https://learn.microsoft.com/graph/connecting-external-content-manage-items#access-control-list](https://learn.microsoft.com/graph/connecting-external-content-manage-items#access-control-list)
143
+ - Create, update, and delete items added by your application via Microsoft Graph connectors [https://learn.microsoft.com/graph/connecting-external-content-manage-items](https://learn.microsoft.com/graph/connecting-external-content-manage-items)
144
+ - Use external groups to manage permissions to Microsoft Graph connectors data sources [https://learn.microsoft.com/graph/connecting-external-content-external-groups](https://learn.microsoft.com/graph/connecting-external-content-external-groups)
145
+ - Create externalItem [https://learn.microsoft.com/graph/api/externalconnectors-externalconnection-put-items?view=graph-rest-1.0&tabs=http](https://learn.microsoft.com/graph/api/externalconnectors-externalconnection-put-items?view=graph-rest-1.0&tabs=http)
@@ -13,8 +13,11 @@ m365 teams user app remove [options]
13
13
  ## Options
14
14
 
15
15
  ```md definition-list
16
- `--id <id>`
17
- : The unique id of the app instance installed for the user.
16
+ `--id [id]`
17
+ : The unique id of the app instance installed for the user. Specify either `id` or `name`.
18
+
19
+ `--name [name]`
20
+ : Name of the app instance installed for the user. Specify either `id` or `name`.
18
21
 
19
22
  `--userId [userId]`
20
23
  : The ID of the user to uninstall the app for. Specify `userId` or `userName` but not both.
@@ -35,18 +38,24 @@ Do not use the ID from the manifest of the zip app package or the id from the Mi
35
38
 
36
39
  ## Examples
37
40
 
38
- Uninstall an app for the specified user.
41
+ Uninstall an app by id for the specified user.
39
42
 
40
43
  ```sh
41
44
  m365 teams user app remove --id YzUyN2E0NzAtYTg4Mi00ODFjLTk4MWMtZWU2ZWZhYmE4NWM3IyM0ZDFlYTA0Ny1mMTk2LTQ1MGQtYjJlOS0wZDI4NTViYTA1YTY= --userId 2609af39-7775-4f94-a3dc-0dd67657e900
42
45
  ```
43
46
 
44
- Uninstall an app for the specified user using its UPN.
47
+ Uninstall an app by id for the specified user using its UPN.
45
48
 
46
49
  ```sh
47
50
  m365 teams user app remove --id YzUyN2E0NzAtYTg4Mi00ODFjLTk4MWMtZWU2ZWZhYmE4NWM3IyM0ZDFlYTA0Ny1mMTk2LTQ1MGQtYjJlOS0wZDI4NTViYTA1YTY= --userName admin@contoso.com
48
51
  ```
49
52
 
53
+ Uninstall an app by name for the specified user.
54
+
55
+ ```sh
56
+ m365 teams user app remove --name HelloWorld --userId 2609af39-7775-4f94-a3dc-0dd67657e900
57
+ ```
58
+
50
59
  ## Response
51
60
 
52
61
  The command won't return a response on success.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@pnp/cli-microsoft365",
9
- "version": "7.2.0",
9
+ "version": "7.3.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@azure/msal-common": "^13.2.1",
@@ -47,7 +47,7 @@
47
47
  "microsoft365": "dist/index.js"
48
48
  },
49
49
  "devDependencies": {
50
- "@microsoft/microsoft-graph-types": "^2.38.0",
50
+ "@microsoft/microsoft-graph-types": "^2.40.0",
51
51
  "@types/adm-zip": "^0.5.4",
52
52
  "@types/jmespath": "^0.15.2",
53
53
  "@types/json-to-ast": "^2.1.4",
@@ -506,9 +506,9 @@
506
506
  "integrity": "sha512-2IHAOaLauc8qaAitvWS+U931T+ze+7MNWrDHY47IENP5y2UA0vqJDu67kWZDdpCN1fFC77sfgfB+HV7SrKshnQ=="
507
507
  },
508
508
  "node_modules/@microsoft/microsoft-graph-types": {
509
- "version": "2.38.0",
510
- "resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-types/-/microsoft-graph-types-2.38.0.tgz",
511
- "integrity": "sha512-EXpTf/TFUb0EfBXiQ0rTmZf6fRgBn73lNfYdU2QKvqiMPQD/Cs2Gt+VmWVtK19F9Mf5Mt4bDTu5Ft0TGXOF8rA==",
509
+ "version": "2.40.0",
510
+ "resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-types/-/microsoft-graph-types-2.40.0.tgz",
511
+ "integrity": "sha512-1fcPVrB/NkbNcGNfCy+Cgnvwxt6/sbIEEFgZHFBJ670zYLegENYJF8qMo7x3LqBjWX2/Eneq5BVVRCLTmlJN+g==",
512
512
  "dev": true
513
513
  },
514
514
  "node_modules/@microsoft/recognizers-text-data-types-timex-expression": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "7.2.0",
3
+ "version": "7.3.0-beta.16c6462",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -276,7 +276,7 @@
276
276
  "yaml": "^2.3.4"
277
277
  },
278
278
  "devDependencies": {
279
- "@microsoft/microsoft-graph-types": "^2.38.0",
279
+ "@microsoft/microsoft-graph-types": "^2.40.0",
280
280
  "@types/adm-zip": "^0.5.4",
281
281
  "@types/jmespath": "^0.15.2",
282
282
  "@types/json-to-ast": "^2.1.4",
@@ -300,4 +300,4 @@
300
300
  "sinon": "^15.2.0",
301
301
  "source-map-support": "^0.5.21"
302
302
  }
303
- }
303
+ }