@pnp/cli-microsoft365 10.1.0-beta.f17d225 → 10.1.0
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/README.md +2 -2
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/AuthServer.js +1 -1
- package/dist/Command.js +2 -2
- package/dist/cli/cli.js +2 -2
- package/dist/m365/base/AppCommand.js +5 -2
- package/dist/m365/commands/login.js +3 -2
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +18 -4
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +34 -2
- package/dist/m365/entra/commands/app/app-get.js +17 -5
- package/dist/m365/entra/commands/app/app-list.js +34 -2
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +3 -0
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +3 -0
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +3 -0
- package/dist/m365/entra/commands/group/group-get.js +6 -3
- package/dist/m365/entra/commands/group/group-list.js +16 -1
- package/dist/m365/entra/commands/m365group/m365group-add.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +21 -6
- package/dist/m365/entra/commands/m365group/m365group-get.js +29 -7
- package/dist/m365/entra/commands/m365group/m365group-list.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-remove.js +21 -9
- package/dist/m365/entra/commands/m365group/m365group-renew.js +19 -7
- package/dist/m365/entra/commands/m365group/m365group-set.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +12 -21
- package/dist/m365/file/commands/convert/convert-pdf.js +3 -4
- package/dist/m365/file/commands/file-add.js +5 -6
- package/dist/m365/graph/commands/subscription/subscription-add.js +46 -5
- package/dist/m365/pp/commands/{chatbot/chatbot-get.js → copilot/copilot-get.js} +24 -20
- package/dist/m365/pp/commands/{chatbot/chatbot-list.js → copilot/copilot-list.js} +16 -12
- package/dist/m365/pp/commands/{chatbot/chatbot-remove.js → copilot/copilot-remove.js} +28 -24
- package/dist/m365/pp/commands.js +3 -0
- package/dist/m365/spe/ContainerProperties.js +2 -0
- package/dist/m365/spe/commands/container/container-list.js +87 -0
- package/dist/m365/spe/commands/containertype/containertype-get.js +103 -0
- package/dist/m365/spe/commands/containertype/containertype-list.js +2 -22
- package/dist/m365/spe/commands.js +2 -0
- package/dist/m365/spfx/commands/package/package-generate.js +1 -1
- package/dist/m365/spfx/commands/project/JsonRule.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016004_TS_property_pane_property_import.js +2 -2
- package/dist/m365/spfx/commands/spfx-doctor.js +1 -1
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +6 -3
- package/dist/m365/spo/commands/file/file-add.js +1 -1
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +1 -2
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +1 -2
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -2
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +1 -2
- package/dist/m365/spo/commands/list/list-contenttype-list.js +5 -2
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +10 -8
- package/dist/m365/spo/commands/listitem/listitem-batch-set.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +1 -2
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +1 -2
- package/dist/m365/spo/commands/page/page-add.js +1 -1
- package/dist/m365/spo/commands/site/site-admin-add.js +4 -12
- package/dist/m365/spo/commands/site/site-admin-list.js +3 -11
- package/dist/m365/spo/commands/site/site-admin-remove.js +4 -12
- package/dist/m365/spo/commands/site/site-set.js +1 -1
- package/dist/m365/spp/commands/model/model-remove.js +105 -0
- package/dist/m365/spp/commands.js +2 -1
- package/dist/m365/teams/commands/user/user-app-list.js +1 -1
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +2 -8
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +2 -8
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +2 -8
- package/dist/m365/todo/commands/list/list-remove.js +2 -1
- package/dist/m365/todo/commands/list/list-set.js +2 -1
- package/dist/m365/todo/commands/task/task-add.js +2 -1
- package/dist/m365/todo/commands/task/task-get.js +2 -1
- package/dist/m365/todo/commands/task/task-list.js +2 -1
- package/dist/m365/todo/commands/task/task-remove.js +2 -1
- package/dist/m365/todo/commands/task/task-set.js +1 -1
- package/dist/m365/viva/commands/engage/engage-community-set.js +111 -0
- package/dist/m365/viva/commands.js +1 -0
- package/dist/utils/entraAdministrativeUnit.js +14 -2
- package/dist/utils/entraGroup.js +49 -6
- package/dist/utils/formatting.js +8 -20
- package/dist/utils/spo.js +23 -4
- package/dist/utils/spp.js +3 -3
- package/dist/utils/urlUtil.js +11 -14
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-get.mdx +10 -3
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-list.mdx +16 -1
- package/docs/docs/cmd/entra/app/app-get.mdx +13 -8
- package/docs/docs/cmd/entra/app/app-list.mdx +16 -1
- package/docs/docs/cmd/entra/group/group-get.mdx +10 -3
- package/docs/docs/cmd/entra/group/group-list.mdx +9 -2
- package/docs/docs/cmd/entra/m365group/m365group-conversation-list.mdx +12 -3
- package/docs/docs/cmd/entra/m365group/m365group-get.mdx +29 -5
- package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +7 -4
- package/docs/docs/cmd/entra/m365group/m365group-renew.mdx +11 -2
- package/docs/docs/cmd/entra/m365group/m365group-teamify.mdx +12 -3
- package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +2 -2
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +6 -0
- package/docs/docs/cmd/entra/m365group/m365group-user-remove.mdx +1 -1
- package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +3 -3
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +30 -5
- package/docs/docs/cmd/login.mdx +45 -44
- package/docs/docs/cmd/pp/{chatbot/chatbot-get.mdx → copilot/copilot-get.mdx} +24 -18
- package/docs/docs/cmd/pp/{chatbot/chatbot-list.mdx → copilot/copilot-list.mdx} +20 -14
- package/docs/docs/cmd/pp/{chatbot/chatbot-remove.mdx → copilot/copilot-remove.mdx} +16 -10
- package/docs/docs/cmd/pp/managementapp/managementapp-add.mdx +1 -1
- package/docs/docs/cmd/spe/container/container-list.mdx +97 -0
- package/docs/docs/cmd/spe/containertype/containertype-get.mdx +114 -0
- package/docs/docs/cmd/spo/contenttype/contenttype-get.mdx +7 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-list.mdx +7 -1
- package/docs/docs/cmd/spo/list/list-contenttype-list.mdx +7 -1
- package/docs/docs/cmd/spp/model/model-remove.mdx +57 -0
- package/docs/docs/cmd/viva/engage/engage-community-set.mdx +61 -0
- package/npm-shrinkwrap.json +6 -0
- package/package.json +5 -3
- package/dist/m365/spe/ContainerTypeProperties.js +0 -2
package/dist/utils/spo.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import os from 'os';
|
|
2
|
-
import url from 'url';
|
|
3
2
|
import { urlUtil } from "./urlUtil.js";
|
|
4
3
|
import { validation } from "./validation.js";
|
|
5
4
|
import auth from '../Auth.js';
|
|
@@ -54,6 +53,24 @@ export const spo = {
|
|
|
54
53
|
};
|
|
55
54
|
return context;
|
|
56
55
|
},
|
|
56
|
+
async getAllContainerTypes(spoAdminUrl, logger, verbose) {
|
|
57
|
+
const formDigestInfo = await spo.ensureFormDigest(spoAdminUrl, logger, undefined, verbose);
|
|
58
|
+
const requestOptions = {
|
|
59
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
60
|
+
headers: {
|
|
61
|
+
'X-RequestDigest': formDigestInfo.FormDigestValue
|
|
62
|
+
},
|
|
63
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="46" ObjectPathId="45" /><Method Name="GetSPOContainerTypes" Id="47" ObjectPathId="45"><Parameters><Parameter Type="Enum">1</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="45" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
64
|
+
};
|
|
65
|
+
const res = await request.post(requestOptions);
|
|
66
|
+
const json = JSON.parse(res);
|
|
67
|
+
const response = json[0];
|
|
68
|
+
if (response.ErrorInfo) {
|
|
69
|
+
throw new Error(response.ErrorInfo.ErrorMessage);
|
|
70
|
+
}
|
|
71
|
+
const containerTypes = json[json.length - 1];
|
|
72
|
+
return containerTypes;
|
|
73
|
+
},
|
|
57
74
|
async waitUntilFinished({ operationId, siteUrl, logger, currentContext, debug, verbose }) {
|
|
58
75
|
const resFormDigest = await spo.ensureFormDigest(siteUrl, logger, currentContext, debug);
|
|
59
76
|
currentContext = resFormDigest;
|
|
@@ -182,8 +199,10 @@ export const spo = {
|
|
|
182
199
|
* @param siteAccessToken a valid access token for the site specified in the webFullUrl param
|
|
183
200
|
*/
|
|
184
201
|
async ensureFolder(webFullUrl, folderToEnsure, logger, debug) {
|
|
185
|
-
|
|
186
|
-
|
|
202
|
+
try {
|
|
203
|
+
new URL(webFullUrl);
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
187
206
|
throw new Error('webFullUrl is not a valid URL');
|
|
188
207
|
}
|
|
189
208
|
if (!folderToEnsure) {
|
|
@@ -1042,7 +1061,7 @@ export const spo = {
|
|
|
1042
1061
|
headers: {
|
|
1043
1062
|
'X-RequestDigest': context.FormDigestValue
|
|
1044
1063
|
},
|
|
1045
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions>${payload.join('')}<ObjectPath Id="14" ObjectPathId="13" /><ObjectIdentityQuery Id="15" ObjectPathId="5" /><Query Id="16" ObjectPathId="13"><Query SelectAllProperties="false"><Properties><Property Name="IsComplete" ScalarProperty="true" /><Property Name="PollingInterval" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Identity Id="5" Name="53d8499e-d0d2-5000-cb83-9ade5be42ca4|${tenantId.
|
|
1064
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions>${payload.join('')}<ObjectPath Id="14" ObjectPathId="13" /><ObjectIdentityQuery Id="15" ObjectPathId="5" /><Query Id="16" ObjectPathId="13"><Query SelectAllProperties="false"><Properties><Property Name="IsComplete" ScalarProperty="true" /><Property Name="PollingInterval" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Identity Id="5" Name="53d8499e-d0d2-5000-cb83-9ade5be42ca4|${tenantId.substring(pos, tenantId.indexOf('&'))}
SiteProperties
${formatting.encodeQueryParameter(url)}" /><Method Id="13" ParentId="5" Name="Update" /></ObjectPaths></Request>`
|
|
1046
1065
|
};
|
|
1047
1066
|
const res = await request.post(requestOptionsUpdateProperties);
|
|
1048
1067
|
const json = JSON.parse(res);
|
package/dist/utils/spp.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
2
|
export const spp = {
|
|
3
3
|
/**
|
|
4
|
-
* Asserts whether the specified site is a content center
|
|
5
|
-
* @param siteUrl The URL of the site to check
|
|
6
|
-
* @throws
|
|
4
|
+
* Asserts whether the specified site is a content center
|
|
5
|
+
* @param siteUrl The URL of the site to check
|
|
6
|
+
* @throws error when site is not a content center.
|
|
7
7
|
*/
|
|
8
8
|
async assertSiteIsContentCenter(siteUrl) {
|
|
9
9
|
const requestOptions = {
|
package/dist/utils/urlUtil.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import url from 'url';
|
|
2
1
|
export const urlUtil = {
|
|
3
2
|
/**
|
|
4
3
|
* Returns server relative path.
|
|
@@ -15,12 +14,7 @@ export const urlUtil = {
|
|
|
15
14
|
* urlUtil.getServerRelativePath("/sites/team1/", "/Shared Documents");
|
|
16
15
|
*/
|
|
17
16
|
getServerRelativePath(webUrl, folderRelativePath) {
|
|
18
|
-
|
|
19
|
-
// if webUrl is a server-relative URL then tenantUrl will resolve to null//null
|
|
20
|
-
// in which case we should keep webUrl
|
|
21
|
-
let webRelativePath = tenantUrl !== 'null//null' ? webUrl.substr(tenantUrl.length) : webUrl;
|
|
22
|
-
// will be used to remove relative path from the folderRelativePath
|
|
23
|
-
// in case the web relative url is included
|
|
17
|
+
let webRelativePath = this.getUrlRelativePath(webUrl);
|
|
24
18
|
let relativePathToRemove = webRelativePath;
|
|
25
19
|
// add '/' at 0
|
|
26
20
|
if (webRelativePath[0] !== '/') {
|
|
@@ -90,11 +84,8 @@ export const urlUtil = {
|
|
|
90
84
|
* Utils.getWebRelativePath("/sites/team1/", "/sites/team1/Shared Documents");
|
|
91
85
|
*/
|
|
92
86
|
getWebRelativePath(webUrl, folderUrl) {
|
|
87
|
+
let webRelativePath = this.getUrlRelativePath(webUrl);
|
|
93
88
|
let folderWebRelativePath = '';
|
|
94
|
-
const tenantUrl = `${url.parse(webUrl).protocol}//${url.parse(webUrl).hostname}`;
|
|
95
|
-
// if webUrl is a server-relative URL then tenantUrl will resolve to null//null
|
|
96
|
-
// in which case we should keep webUrl
|
|
97
|
-
let webRelativePath = tenantUrl !== 'null//null' ? webUrl.substr(tenantUrl.length) : webUrl;
|
|
98
89
|
// will be used to remove relative path from the folderRelativePath
|
|
99
90
|
// in case the web relative url is included
|
|
100
91
|
let relativePathToRemove = webRelativePath;
|
|
@@ -140,12 +131,11 @@ export const urlUtil = {
|
|
|
140
131
|
* urlUtil.getAbsoluteUrl("https://contoso.sharepoint.com/sites/team1/", "/sites/team1/Lists/MyList");
|
|
141
132
|
*/
|
|
142
133
|
getAbsoluteUrl(webUrl, serverRelativeUrl) {
|
|
143
|
-
const
|
|
144
|
-
const tenantUrl = `${uri.protocol}//${uri.hostname}`;
|
|
134
|
+
const parsedUrl = new URL(webUrl);
|
|
145
135
|
if (serverRelativeUrl[0] !== '/') {
|
|
146
136
|
serverRelativeUrl = `/${serverRelativeUrl}`;
|
|
147
137
|
}
|
|
148
|
-
return `${
|
|
138
|
+
return `${parsedUrl.origin}${serverRelativeUrl}`;
|
|
149
139
|
},
|
|
150
140
|
/**
|
|
151
141
|
* Combines base and relative url considering any missing slashes
|
|
@@ -213,6 +203,13 @@ export const urlUtil = {
|
|
|
213
203
|
*/
|
|
214
204
|
removeTrailingSlashes(url) {
|
|
215
205
|
return url.replace(/\/+$/, '');
|
|
206
|
+
},
|
|
207
|
+
getUrlRelativePath(url) {
|
|
208
|
+
if (url.includes('://')) {
|
|
209
|
+
const parsedUrl = new URL(url);
|
|
210
|
+
return url.substring(parsedUrl.origin.length);
|
|
211
|
+
}
|
|
212
|
+
return url;
|
|
216
213
|
}
|
|
217
214
|
};
|
|
218
215
|
//# sourceMappingURL=urlUtil.js.map
|
|
@@ -20,22 +20,29 @@ m365 entra administrativeunit get [options]
|
|
|
20
20
|
|
|
21
21
|
`-n, --displayName [displayName]`
|
|
22
22
|
: The display name of the administrative unit. Specify either `id` or `displayName` but not both.
|
|
23
|
+
|
|
24
|
+
`-p, --properties [properties]`
|
|
25
|
+
: Comma-separated list of properties to retrieve.
|
|
23
26
|
```
|
|
24
27
|
|
|
25
28
|
<Global />
|
|
26
29
|
|
|
30
|
+
## Remarks
|
|
31
|
+
|
|
32
|
+
Using the `--properties` option, you can specify a comma-separated list of administrative unit properties to retrieve from the Microsoft Graph. If you don't specify any properties, the command will output the default properties returned by Graph.
|
|
33
|
+
|
|
27
34
|
## Examples
|
|
28
35
|
|
|
29
|
-
Get information about the administrative unit by its id
|
|
36
|
+
Get information about the administrative unit by its id.
|
|
30
37
|
|
|
31
38
|
```sh
|
|
32
39
|
m365 entra administrativeunit get --id 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
|
|
33
40
|
```
|
|
34
41
|
|
|
35
|
-
Get information about the administrative unit by its display name
|
|
42
|
+
Get information about the administrative unit by its display name with specified properties.
|
|
36
43
|
|
|
37
44
|
```sh
|
|
38
|
-
m365 entra administrativeunit get --displayName
|
|
45
|
+
m365 entra administrativeunit get --displayName "Marketing Division" --properties "id,displayName"
|
|
39
46
|
```
|
|
40
47
|
|
|
41
48
|
## Response
|
|
@@ -14,16 +14,31 @@ m365 entra administrativeunit list [options]
|
|
|
14
14
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-p, --properties [properties]`
|
|
19
|
+
: Comma-separated list of properties to retrieve.
|
|
20
|
+
```
|
|
21
|
+
|
|
17
22
|
<Global />
|
|
18
23
|
|
|
24
|
+
## Remarks
|
|
25
|
+
|
|
26
|
+
Using the `--properties` option, you can specify a comma-separated list of administrative unit properties to retrieve from the Microsoft Graph. If you don't specify any properties, the command will output the default properties returned by Graph.
|
|
27
|
+
|
|
19
28
|
## Examples
|
|
20
29
|
|
|
21
|
-
Retrieve a list of administrative units
|
|
30
|
+
Retrieve a list of administrative units.
|
|
22
31
|
|
|
23
32
|
```sh
|
|
24
33
|
m365 entra administrativeunit list
|
|
25
34
|
```
|
|
26
35
|
|
|
36
|
+
Retrieve a list of administrative units with specified properties.
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
m365 entra administrativeunit list --properties "id,displayName"
|
|
40
|
+
```
|
|
41
|
+
|
|
27
42
|
## Response
|
|
28
43
|
|
|
29
44
|
<Tabs>
|
|
@@ -22,16 +22,19 @@ m365 entra appregistration get [options]
|
|
|
22
22
|
|
|
23
23
|
```md definition-list
|
|
24
24
|
`--appId [appId]`
|
|
25
|
-
: Application (client) ID of the Entra application registration to get. Specify either `appId`, `objectId` or `name
|
|
25
|
+
: Application (client) ID of the Entra application registration to get. Specify either `appId`, `objectId` or `name`.
|
|
26
26
|
|
|
27
27
|
`--objectId [objectId]`
|
|
28
|
-
: Object ID of the Entra application registration to get. Specify either `appId`, `objectId` or `name
|
|
28
|
+
: Object ID of the Entra application registration to get. Specify either `appId`, `objectId` or `name`.
|
|
29
29
|
|
|
30
30
|
`--name [name]`
|
|
31
|
-
: Name of the Entra application registration to get. Specify either `appId`, `objectId` or `name
|
|
31
|
+
: Name of the Entra application registration to get. Specify either `appId`, `objectId` or `name`.
|
|
32
32
|
|
|
33
33
|
`--save`
|
|
34
|
-
: Use to store the information about the created app in a local file
|
|
34
|
+
: Use to store the information about the created app in a local file.
|
|
35
|
+
|
|
36
|
+
`-p, --properties [properties]`
|
|
37
|
+
: Comma-separated list of properties to retrieve.
|
|
35
38
|
```
|
|
36
39
|
|
|
37
40
|
<Global />
|
|
@@ -44,24 +47,26 @@ If the command finds multiple Entra application registrations with the specified
|
|
|
44
47
|
|
|
45
48
|
If you want to store the information about the Entra app registration, use the `--save` option. This is useful when you build solutions connected to Microsoft 365 and want to easily manage app registrations used with your solution. When you use the `--save` option, after you get the app registration, the command will write its ID and name to the `.m365rc.json` file in the current directory. If the file already exists, it will add the information about the App registration to it if it's not already present, allowing you to track multiple apps. If the file doesn't exist, the command will create it.
|
|
46
49
|
|
|
50
|
+
Using the `--properties` option, you can specify a comma-separated list of app properties to retrieve from the Microsoft Graph. If you don't specify any properties, the command will output the default properties returned by Graph.
|
|
51
|
+
|
|
47
52
|
## Examples
|
|
48
53
|
|
|
49
|
-
Get the Entra application registration by its app (client) ID
|
|
54
|
+
Get the Entra application registration by its app (client) ID.
|
|
50
55
|
|
|
51
56
|
```sh
|
|
52
57
|
m365 entra app get --appId d75be2e1-0204-4f95-857d-51a37cf40be8
|
|
53
58
|
```
|
|
54
59
|
|
|
55
|
-
Get the Entra application registration by its object ID
|
|
60
|
+
Get the Entra application registration by its object ID.
|
|
56
61
|
|
|
57
62
|
```sh
|
|
58
63
|
m365 entra app get --objectId d75be2e1-0204-4f95-857d-51a37cf40be8
|
|
59
64
|
```
|
|
60
65
|
|
|
61
|
-
Get the Entra application registration by its name
|
|
66
|
+
Get the Entra application registration by its name with specified properties.
|
|
62
67
|
|
|
63
68
|
```sh
|
|
64
|
-
m365 entra app get --name "My app"
|
|
69
|
+
m365 entra app get --name "My app" --properties "appId,displayName"
|
|
65
70
|
```
|
|
66
71
|
|
|
67
72
|
Get the Entra application registration by its name. Store information about the retrieved app registration in the _.m365rc.json_ file in the current directory.
|
|
@@ -20,16 +20,31 @@ m365 entra appregistration list [options]
|
|
|
20
20
|
|
|
21
21
|
## Options
|
|
22
22
|
|
|
23
|
+
```md definition-list
|
|
24
|
+
`-p, --properties [properties]`
|
|
25
|
+
: Comma-separated list of properties to retrieve.
|
|
26
|
+
```
|
|
27
|
+
|
|
23
28
|
<Global />
|
|
24
29
|
|
|
30
|
+
## Remarks
|
|
31
|
+
|
|
32
|
+
Using the `--properties` option, you can specify a comma-separated list of app properties to retrieve from the Microsoft Graph. If you don't specify any properties, the command will output the default properties returned by Graph.
|
|
33
|
+
|
|
25
34
|
## Examples
|
|
26
35
|
|
|
27
|
-
Retrieve a list of Entra app registrations
|
|
36
|
+
Retrieve a list of Entra app registrations.
|
|
28
37
|
|
|
29
38
|
```sh
|
|
30
39
|
m365 entra app list
|
|
31
40
|
```
|
|
32
41
|
|
|
42
|
+
Retrieve a list of Entra app registrations with specified properties.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
m365 entra app list --properties "appId,displayName"
|
|
46
|
+
```
|
|
47
|
+
|
|
33
48
|
## Response
|
|
34
49
|
|
|
35
50
|
<Tabs>
|
|
@@ -20,22 +20,29 @@ m365 entra group get [options]
|
|
|
20
20
|
|
|
21
21
|
`-n, --displayName [displayName]`
|
|
22
22
|
: The display name of the Entra group. Specify either `id` or `displayName` but not both.
|
|
23
|
+
|
|
24
|
+
`-p, --properties [properties]`
|
|
25
|
+
: Comma-separated list of properties to retrieve.
|
|
23
26
|
```
|
|
24
27
|
|
|
25
28
|
<Global />
|
|
26
29
|
|
|
30
|
+
## Remarks
|
|
31
|
+
|
|
32
|
+
Using the `--properties` option, you can specify a comma-separated list of group properties to retrieve from the Microsoft Graph. If you don't specify any properties, the command will output the default properties returned by Graph.
|
|
33
|
+
|
|
27
34
|
## Examples
|
|
28
35
|
|
|
29
|
-
Get information about an Entra Group by id
|
|
36
|
+
Get information about an Entra Group by id.
|
|
30
37
|
|
|
31
38
|
```sh
|
|
32
39
|
m365 entra group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844
|
|
33
40
|
```
|
|
34
41
|
|
|
35
|
-
Get information about an Entra Group by its display name
|
|
42
|
+
Get information about an Entra Group by its display name with specified properties.
|
|
36
43
|
|
|
37
44
|
```sh
|
|
38
|
-
m365 entra group get --displayName Finance
|
|
45
|
+
m365 entra group get --displayName Finance --properties "mail,displayName"
|
|
39
46
|
```
|
|
40
47
|
|
|
41
48
|
## Response
|
|
@@ -17,10 +17,17 @@ m365 entra group list [options]
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`--type [type]`
|
|
19
19
|
: Filter the results to only groups of a given type. Allowed values: `microsoft365`, `security`, `distribution`, `mailEnabledSecurity`. By default, all groups are listed.
|
|
20
|
+
|
|
21
|
+
`-p, --properties [properties]`
|
|
22
|
+
: Comma-separated list of properties to retrieve.
|
|
20
23
|
```
|
|
21
24
|
|
|
22
25
|
<Global />
|
|
23
26
|
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
Using the `--properties` option, you can specify a comma-separated list of group properties to retrieve from the Microsoft Graph. If you don't specify any properties, the command will output the default properties returned by Graph.
|
|
30
|
+
|
|
24
31
|
## Examples
|
|
25
32
|
|
|
26
33
|
Lists all groups defined in Entra ID.
|
|
@@ -29,10 +36,10 @@ Lists all groups defined in Entra ID.
|
|
|
29
36
|
m365 entra group list
|
|
30
37
|
```
|
|
31
38
|
|
|
32
|
-
List all security groups defined in Entra ID.
|
|
39
|
+
List all security groups defined in Entra ID with specified properties.
|
|
33
40
|
|
|
34
41
|
```sh
|
|
35
|
-
m365 entra group list --type security
|
|
42
|
+
m365 entra group list --type security --properties "mail,displayName"
|
|
36
43
|
```
|
|
37
44
|
|
|
38
45
|
## Response
|
|
@@ -15,20 +15,29 @@ m365 entra m365group conversation list [options]
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
|
-
`-i, --groupId
|
|
19
|
-
: The ID of the Microsoft 365
|
|
18
|
+
`-i, --groupId [groupId]`
|
|
19
|
+
: The ID of the Microsoft 365 Group. Specify either `groupId` or `groupName`, but not both.
|
|
20
|
+
|
|
21
|
+
`-n, --groupName [groupName]`
|
|
22
|
+
: Display name of the Microsoft 365 Group. Specify either `groupId` or `groupName`, but not both.
|
|
20
23
|
```
|
|
21
24
|
|
|
22
25
|
<Global />
|
|
23
26
|
|
|
24
27
|
## Examples
|
|
25
28
|
|
|
26
|
-
Lists conversations for the
|
|
29
|
+
Lists conversations for the Microsoft 365 group specified by id.
|
|
27
30
|
|
|
28
31
|
```sh
|
|
29
32
|
m365 entra m365group conversation list --groupId '00000000-0000-0000-0000-000000000000'
|
|
30
33
|
```
|
|
31
34
|
|
|
35
|
+
Lists conversations for the Microsoft 365 group specified by displayName.
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 entra m365group conversation list --groupName Finance
|
|
39
|
+
```
|
|
40
|
+
|
|
32
41
|
## Response
|
|
33
42
|
|
|
34
43
|
<Tabs>
|
|
@@ -15,8 +15,11 @@ m365 entra m365group get [options]
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
|
-
`-i, --id
|
|
19
|
-
: The ID of the Microsoft 365 Group or Microsoft Teams team to retrieve information for
|
|
18
|
+
`-i, --id [id]`
|
|
19
|
+
: The ID of the Microsoft 365 Group or Microsoft Teams team to retrieve information for. Specify either `id` or `displayName`, but not both.
|
|
20
|
+
|
|
21
|
+
`-n, --displayName [displayName]`
|
|
22
|
+
: Display name of the Microsoft 365 Group or Microsoft Teams team to retrieve information for. Specify either `id` or `displayName`, but not both.
|
|
20
23
|
|
|
21
24
|
`--includeSiteUrl`
|
|
22
25
|
: Set to retrieve the site URL for the group
|
|
@@ -32,6 +35,12 @@ Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-9
|
|
|
32
35
|
m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844
|
|
33
36
|
```
|
|
34
37
|
|
|
38
|
+
Get information about the Microsoft 365 Group with displayName _Finance_
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 entra m365group get --displayName Finance
|
|
42
|
+
```
|
|
43
|
+
|
|
35
44
|
Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_ and also retrieve the URL of the corresponding SharePoint site
|
|
36
45
|
|
|
37
46
|
```sh
|
|
@@ -80,7 +89,12 @@ m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSite
|
|
|
80
89
|
"securityIdentifier": "S-1-12-1-4288263055-1337657931-1773679776-1830684296",
|
|
81
90
|
"theme": null,
|
|
82
91
|
"visibility": "Public",
|
|
83
|
-
"onPremisesProvisioningErrors": []
|
|
92
|
+
"onPremisesProvisioningErrors": [],
|
|
93
|
+
"allowExternalSenders": false,
|
|
94
|
+
"autoSubscribeNewMembers": false,
|
|
95
|
+
"isSubscribedByMail": false,
|
|
96
|
+
"hideFromOutlookClients": false,
|
|
97
|
+
"hideFromAddressLists": false
|
|
84
98
|
}
|
|
85
99
|
```
|
|
86
100
|
|
|
@@ -88,6 +102,8 @@ m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSite
|
|
|
88
102
|
<TabItem value="Text">
|
|
89
103
|
|
|
90
104
|
```text
|
|
105
|
+
allowExternalSenders : false
|
|
106
|
+
autoSubscribeNewMembers : false
|
|
91
107
|
classification : null
|
|
92
108
|
createdDateTime : 2023-06-01T20:18:30Z
|
|
93
109
|
creationOptions : []
|
|
@@ -96,8 +112,11 @@ m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSite
|
|
|
96
112
|
displayName : Finance
|
|
97
113
|
expirationDateTime : null
|
|
98
114
|
groupTypes : ["Unified"]
|
|
115
|
+
hideFromAddressLists : false
|
|
116
|
+
hideFromOutlookClients : false
|
|
99
117
|
id : ff99b38f-0a4b-4fbb-a034-b86988061e6d
|
|
100
118
|
isAssignableToRole : null
|
|
119
|
+
isSubscribedByMail : false
|
|
101
120
|
mail : finance@contoso.onmicrosoft.com
|
|
102
121
|
mailEnabled : true
|
|
103
122
|
mailNickname : finance
|
|
@@ -126,8 +145,8 @@ m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSite
|
|
|
126
145
|
<TabItem value="CSV">
|
|
127
146
|
|
|
128
147
|
```csv
|
|
129
|
-
id,createdDateTime,description,displayName,mail,mailEnabled,mailNickname,renewedDateTime,securityEnabled,securityIdentifier,visibility
|
|
130
|
-
ff99b38f-0a4b-4fbb-a034-b86988061e6d,2023-06-01T20:18:30Z,"This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.",Finance,finance@contoso.onmicrosoft.com,1,finance,2023-06-01T20:18:30Z,,S-1-12-1-4288263055-1337657931-1773679776-1830684296,Public
|
|
148
|
+
id,createdDateTime,description,displayName,mail,mailEnabled,mailNickname,renewedDateTime,securityEnabled,securityIdentifier,visibility,allowExternalSenders,autoSubscribeNewMembers,isSubscribedByMail,hideFromOutlookClients,hideFromAddressLists
|
|
149
|
+
ff99b38f-0a4b-4fbb-a034-b86988061e6d,2023-06-01T20:18:30Z,"This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.",Finance,finance@contoso.onmicrosoft.com,1,finance,2023-06-01T20:18:30Z,,S-1-12-1-4288263055-1337657931-1773679776-1830684296,Public,false,false,false,false,false
|
|
131
150
|
```
|
|
132
151
|
|
|
133
152
|
</TabItem>
|
|
@@ -153,6 +172,11 @@ m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSite
|
|
|
153
172
|
securityEnabled | false
|
|
154
173
|
securityIdentifier | S-1-12-1-4288263055-1337657931-1773679776-1830684296
|
|
155
174
|
visibility | Public
|
|
175
|
+
allowExternalSenders | false
|
|
176
|
+
autoSubscribeNewMembers | false
|
|
177
|
+
isSubscribedByMail | false
|
|
178
|
+
hideFromOutlookClients | false
|
|
179
|
+
hideFromAddressLists | false
|
|
156
180
|
```
|
|
157
181
|
|
|
158
182
|
</TabItem>
|
|
@@ -13,8 +13,11 @@ m365 entra m365group remove [options]
|
|
|
13
13
|
## Options
|
|
14
14
|
|
|
15
15
|
```md definition-list
|
|
16
|
-
`-i, --id
|
|
17
|
-
: The ID of the Microsoft 365 Group to remove
|
|
16
|
+
`-i, --id [id]`
|
|
17
|
+
: The ID of the Microsoft 365 Group to remove. Specify either `id` or `displayName`, but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --displayName [displayName]`
|
|
20
|
+
: Display name of the Microsoft 365 Group to remove. Specify either `id` or `displayName`, but not both.
|
|
18
21
|
|
|
19
22
|
`-f, --force`
|
|
20
23
|
: Don't prompt for confirming removing the group
|
|
@@ -47,10 +50,10 @@ Remove group with id _28beab62-7540-4db1-a23f-29a6018a3848_. Will prompt for con
|
|
|
47
50
|
m365 entra m365group remove --id 28beab62-7540-4db1-a23f-29a6018a3848
|
|
48
51
|
```
|
|
49
52
|
|
|
50
|
-
Remove group with
|
|
53
|
+
Remove group with displayName _Finance_ without prompting for confirmation
|
|
51
54
|
|
|
52
55
|
```sh
|
|
53
|
-
m365 entra m365group remove --
|
|
56
|
+
m365 entra m365group remove --displayName Finance --force
|
|
54
57
|
```
|
|
55
58
|
|
|
56
59
|
Remove group with id _28beab62-7540-4db1-a23f-29a6018a3848_ without prompting for confirmation and without moving it to the Recycle Bin
|
|
@@ -13,8 +13,11 @@ m365 entra m365group renew [options]
|
|
|
13
13
|
## Options
|
|
14
14
|
|
|
15
15
|
```md definition-list
|
|
16
|
-
`-i, --id
|
|
17
|
-
: The ID of the Microsoft 365 group to renew
|
|
16
|
+
`-i, --id [id]`
|
|
17
|
+
: The ID of the Microsoft 365 group to renew. Specify either `id` or `displayName`, but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --displayName [displayName]`
|
|
20
|
+
: Display name of the Microsoft 365 Group to renew. Specify either `id` or `displayName`, but not both.
|
|
18
21
|
```
|
|
19
22
|
|
|
20
23
|
<Global />
|
|
@@ -31,6 +34,12 @@ Renew the Microsoft 365 group with id _28beab62-7540-4db1-a23f-29a6018a3848_
|
|
|
31
34
|
m365 entra m365group renew --id 28beab62-7540-4db1-a23f-29a6018a3848
|
|
32
35
|
```
|
|
33
36
|
|
|
37
|
+
Renew the Microsoft 365 group with displayName _Finance_
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
m365 entra m365group renew --displayName Finance
|
|
41
|
+
```
|
|
42
|
+
|
|
34
43
|
## Response
|
|
35
44
|
|
|
36
45
|
The command won't return a response on success.
|
|
@@ -14,10 +14,13 @@ m365 entra m365group teamify [options]
|
|
|
14
14
|
|
|
15
15
|
```md definition-list
|
|
16
16
|
`-i, --id [id]`
|
|
17
|
-
: The ID of the Microsoft 365 Group to connect to Microsoft Teams. Specify either `id` or `mailNickname
|
|
17
|
+
: The ID of the Microsoft 365 Group to connect to Microsoft Teams. Specify either `id`, `displayName` or `mailNickname`, but not multiple.
|
|
18
|
+
|
|
19
|
+
`-n, --displayName [displayName]`
|
|
20
|
+
: Display name of the Microsoft 365 Group to connect to Microsoft Teams. Specify either `id`, `displayName` or `mailNickname`, but not multiple.
|
|
18
21
|
|
|
19
22
|
`--mailNickname [mailNickname]`
|
|
20
|
-
: The mail alias of the Microsoft 365 Group to connect to Microsoft Teams. Specify either `id` or `mailNickname
|
|
23
|
+
: The mail alias of the Microsoft 365 Group to connect to Microsoft Teams. Specify either `id`, `displayName` or `mailNickname`, but not multiple.
|
|
21
24
|
```
|
|
22
25
|
|
|
23
26
|
<Global />
|
|
@@ -30,7 +33,13 @@ Creates a new Microsoft Teams team under existing Microsoft 365 group with the s
|
|
|
30
33
|
m365 entra m365group teamify --id e3f60f99-0bad-481f-9e9f-ff0f572fbd03
|
|
31
34
|
```
|
|
32
35
|
|
|
33
|
-
Creates a new Microsoft Teams team under existing Microsoft 365 group with the specified
|
|
36
|
+
Creates a new Microsoft Teams team under existing Microsoft 365 group with the specified displayName.
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
m365 entra m365group teamify --displayName Finance
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Creates a new Microsoft Teams team under existing Microsoft 365 group with the specified mailNickname._
|
|
34
43
|
|
|
35
44
|
```sh
|
|
36
45
|
m365 entra m365group teamify --mailNickname GroupName
|
|
@@ -13,7 +13,7 @@ m365 entra m365group user add [options]
|
|
|
13
13
|
## Alias
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
|
-
m365 teams user add
|
|
16
|
+
m365 teams user add [options]
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Options
|
|
@@ -38,7 +38,7 @@ m365 teams user add
|
|
|
38
38
|
: The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `ids` or `userNames` but not both.
|
|
39
39
|
|
|
40
40
|
`-r, --role [role]`
|
|
41
|
-
: The role to be assigned to the new user: `Owner
|
|
41
|
+
: The role to be assigned to the new user. Allowed values: `Owner`, `Member`. Default `Member`.
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
<Global />
|
|
@@ -57,6 +57,12 @@ List specific properties for all group users from a group specified by ID.
|
|
|
57
57
|
m365 entra m365group user list --groupId 03cba9da-3974-46c1-afaf-79caa2e45bbe --properties "id,jobTitle,companyName,accountEnabled"
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
List all group members that are guest users.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 entra m365group user list --groupDisplayName Developers --filter "userType eq 'Guest'"
|
|
64
|
+
```
|
|
65
|
+
|
|
60
66
|
## Response
|
|
61
67
|
|
|
62
68
|
<Tabs>
|
|
@@ -17,7 +17,7 @@ m365 entra m365group user remove [options]
|
|
|
17
17
|
: The ID of the Microsoft 365 group. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
|
|
18
18
|
|
|
19
19
|
`--groupName [groupName]`
|
|
20
|
-
: The display name of the Microsoft 365 group. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName
|
|
20
|
+
: The display name of the Microsoft 365 group. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
|
|
21
21
|
|
|
22
22
|
`--teamId [teamId]`
|
|
23
23
|
: The ID of the Microsoft Teams team. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
|
|
@@ -32,7 +32,7 @@ m365 entra m365group user set [options]
|
|
|
32
32
|
: The user principal names of users. You can also pass a comma-separated list of UPNs. Specify only one of the following `ids` or `userNames`.
|
|
33
33
|
|
|
34
34
|
`-r, --role <role>`
|
|
35
|
-
: Role to set for the given user in the specified Microsoft 365 Group or Microsoft Teams team. Allowed values: `Owner`, `Member
|
|
35
|
+
: Role to set for the given user in the specified Microsoft 365 Group or Microsoft Teams team. Allowed values: `Owner`, `Member`.
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
<Global />
|
|
@@ -70,13 +70,13 @@ m365 entra m365group user set --groupId '00000000-0000-0000-0000-000000000000' -
|
|
|
70
70
|
Demote multiple users specified by the userNames parameter from Owner to Member of the given Microsoft Teams team
|
|
71
71
|
|
|
72
72
|
```sh
|
|
73
|
-
m365
|
|
73
|
+
m365 teams user set --teamId '00000000-0000-0000-0000-000000000000' --userNames 'anne.matthews@contoso.onmicrosoft.com,john.doe@contoso.onmicrosoft.com' --role Member
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
Demote multiple users specified by the ids parameter from Owner to Member in the given Microsoft Teams team
|
|
77
77
|
|
|
78
78
|
```sh
|
|
79
|
-
m365
|
|
79
|
+
m365 teams user set --teamName 'Engineering' --ids '74a3b772-3122-447b-b9da-10895e238219,dd3d21e4-a142-46b9-8482-bca8fe9596b3' --role Member
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
## Response
|