@pnp/cli-microsoft365 6.3.0-beta.c3dc921 → 6.3.0-beta.e40d7b4
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.js +8 -0
- package/dist/Auth.js +0 -18
- package/dist/Command.js +12 -1
- package/dist/cli/Cli.js +42 -1
- package/dist/m365/aad/commands/group/group-list.js +2 -1
- package/dist/m365/aad/commands/user/user-add.js +223 -0
- package/dist/m365/aad/commands/user/user-license-list.js +99 -0
- package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +103 -0
- package/dist/m365/aad/commands/user/user-recyclebinitem-list.js +41 -0
- package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +92 -0
- package/dist/m365/aad/commands/user/user-remove.js +107 -0
- package/dist/m365/aad/commands.js +6 -0
- package/dist/m365/base/O365MgmtCommand.js +10 -0
- package/dist/m365/context/commands/option/option-list.js +54 -0
- package/dist/m365/context/commands.js +1 -0
- package/dist/m365/file/commands/convert/convert-pdf.js +7 -6
- package/dist/m365/flow/commands/environment/FlowEnvironmentDetails.js +3 -0
- package/dist/m365/flow/commands/environment/environment-get.js +26 -11
- package/dist/m365/flow/commands/run/run-list.js +55 -3
- package/dist/m365/graph/commands/changelog/changelog-list.js +3 -2
- package/dist/m365/onenote/commands/notebook/notebook-list.js +50 -53
- package/dist/m365/onenote/commands/page/page-list.js +2 -16
- package/dist/m365/outlook/commands/mail/mail-send.js +3 -2
- package/dist/m365/outlook/commands/message/message-get.js +4 -3
- package/dist/m365/pa/commands/environment/environment-get.js +13 -5
- package/dist/m365/planner/commands/plan/plan-add.js +20 -6
- package/dist/m365/planner/commands/plan/plan-get.js +40 -26
- package/dist/m365/planner/commands/plan/plan-list.js +24 -14
- package/dist/m365/planner/commands/plan/plan-remove.js +1 -1
- package/dist/m365/planner/commands/plan/plan-set.js +21 -10
- package/dist/m365/planner/commands/roster/roster-add.js +47 -0
- package/dist/m365/planner/commands/roster/roster-get.js +61 -0
- package/dist/m365/planner/commands/roster/roster-member-add.js +113 -0
- package/dist/m365/planner/commands/roster/roster-member-list.js +54 -0
- package/dist/m365/planner/commands/roster/roster-member-remove.js +140 -0
- package/dist/m365/planner/commands/roster/roster-remove.js +88 -0
- package/dist/m365/planner/commands/task/task-add.js +3 -0
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +2 -1
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +2 -1
- package/dist/m365/planner/commands.js +6 -0
- package/dist/m365/pp/commands/environment/environment-get.js +18 -9
- package/dist/m365/pp/commands/solution/solution-get.js +2 -1
- package/dist/m365/pp/commands/solution/solution-list.js +2 -1
- package/dist/m365/purview/commands/auditlog/auditlog-list.js +205 -0
- package/dist/m365/purview/commands/retentionevent/retentionevent-get.js +75 -0
- package/dist/m365/purview/commands/retentionevent/retentionevent-list.js +46 -0
- package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +97 -0
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-add.js +77 -0
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-get.js +75 -0
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-list.js +43 -0
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +97 -0
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-set.js +90 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +5 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-get.js +5 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-list.js +5 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +5 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-set.js +11 -1
- package/dist/m365/purview/commands.js +9 -0
- package/dist/m365/spfx/commands/project/WebApiPermissionRequests.js +3 -0
- package/dist/m365/spfx/commands/project/project-permissions-grant.js +81 -0
- package/dist/m365/spfx/commands.js +3 -2
- package/dist/m365/spo/commands/app/app-add.js +2 -1
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +95 -0
- package/dist/m365/spo/commands/customaction/customaction-get.js +17 -66
- package/dist/m365/spo/commands/customaction/customaction-list.js +2 -36
- package/dist/m365/spo/commands/customaction/customaction-remove.js +11 -18
- package/dist/m365/spo/commands/file/GraphFileDetails.js +0 -1
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +2 -1
- package/dist/m365/spo/commands/file/file-sharinglink-add.js +2 -22
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +137 -0
- package/dist/m365/spo/commands/file/file-sharinglink-get.js +2 -25
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +9 -29
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +2 -25
- package/dist/m365/spo/commands/file/file-sharinglink-set.js +104 -0
- package/dist/m365/spo/commands/group/group-list.js +2 -1
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-add.js +2 -1
- package/dist/m365/spo/commands/listitem/listitem-list.js +2 -1
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +17 -3
- package/dist/m365/spo/commands/navigation/navigation-node-get.js +73 -0
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +4 -7
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +118 -0
- package/dist/m365/spo/commands/page/page-column-get.js +2 -1
- package/dist/m365/spo/commands/page/page-column-list.js +2 -1
- package/dist/m365/spo/commands/page/page-section-get.js +2 -1
- package/dist/m365/spo/commands/page/page-section-list.js +2 -1
- package/dist/m365/spo/commands/site/site-apppermission-add.js +2 -14
- package/dist/m365/spo/commands/site/site-apppermission-get.js +2 -14
- package/dist/m365/spo/commands/site/site-apppermission-list.js +2 -14
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +2 -14
- package/dist/m365/spo/commands/site/site-apppermission-set.js +2 -14
- package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +6 -0
- package/dist/m365/spo/commands/spo-search.js +2 -1
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +179 -0
- package/dist/m365/spo/commands/term/term-list.js +2 -1
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +2 -2
- package/dist/m365/spo/commands/web/web-set.js +11 -4
- package/dist/m365/spo/commands.js +6 -0
- package/dist/m365/teams/commands/chat/chat-list.js +4 -4
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +5 -5
- package/dist/m365/teams/commands/meeting/meeting-get.js +5 -5
- package/dist/m365/teams/commands/meeting/meeting-list.js +5 -4
- package/dist/m365/teams/commands/team/team-app-list.js +1 -1
- package/dist/m365/teams/commands/user/user-app-list.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/yammer/commands/yammer-search.js +2 -1
- package/dist/utils/aadUser.js +38 -0
- package/dist/utils/accessToken.js +1 -1
- package/dist/utils/planner.js +16 -5
- package/dist/utils/spo.js +116 -0
- package/docs/docs/cmd/aad/app/app-list.md +3 -0
- package/docs/docs/cmd/aad/user/user-add.md +168 -0
- package/docs/docs/cmd/aad/user/user-license-list.md +98 -0
- package/docs/docs/cmd/aad/user/user-recyclebinitem-clear.md +42 -0
- package/docs/docs/cmd/aad/user/user-recyclebinitem-list.md +82 -0
- package/docs/docs/cmd/aad/user/user-recyclebinitem-remove.md +45 -0
- package/docs/docs/cmd/aad/user/user-remove.md +51 -0
- package/docs/docs/cmd/aad/user/user-set.md +2 -2
- package/docs/docs/cmd/context/option/option-list.md +63 -0
- package/docs/docs/cmd/flow/environment/environment-get.md +31 -3
- package/docs/docs/cmd/flow/run/run-list.md +21 -0
- package/docs/docs/cmd/login.md +26 -0
- package/docs/docs/cmd/logout.md +4 -0
- package/docs/docs/cmd/pa/app/app-get.md +24 -0
- package/docs/docs/cmd/pa/app/app-list.md +21 -0
- package/docs/docs/cmd/pa/connector/connector-list.md +17 -0
- package/docs/docs/cmd/pa/environment/environment-get.md +26 -2
- package/docs/docs/cmd/pa/environment/environment-list.md +19 -0
- package/docs/docs/cmd/planner/plan/plan-add.md +17 -6
- package/docs/docs/cmd/planner/plan/plan-get.md +21 -7
- package/docs/docs/cmd/planner/plan/plan-list.md +16 -2
- package/docs/docs/cmd/planner/plan/plan-remove.md +4 -0
- package/docs/docs/cmd/planner/plan/plan-set.md +10 -4
- package/docs/docs/cmd/planner/roster/roster-add.md +60 -0
- package/docs/docs/cmd/planner/roster/roster-get.md +73 -0
- package/docs/docs/cmd/planner/roster/roster-member-add.md +87 -0
- package/docs/docs/cmd/planner/roster/roster-member-list.md +76 -0
- package/docs/docs/cmd/planner/roster/roster-member-remove.md +51 -0
- package/docs/docs/cmd/planner/roster/roster-remove.md +48 -0
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-get.md +43 -0
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-list.md +43 -0
- package/docs/docs/cmd/pp/card/card-clone.md +12 -0
- package/docs/docs/cmd/pp/card/card-get.md +49 -0
- package/docs/docs/cmd/pp/card/card-list.md +49 -0
- package/docs/docs/cmd/pp/chatbot/chatbot-get.md +55 -0
- package/docs/docs/cmd/pp/chatbot/chatbot-list.md +36 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.md +30 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.md +30 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-row-list.md +30 -0
- package/docs/docs/cmd/pp/environment/environment-get.md +19 -0
- package/docs/docs/cmd/pp/environment/environment-list.md +19 -0
- package/docs/docs/cmd/pp/gateway/gateway-get.md +19 -0
- package/docs/docs/cmd/pp/gateway/gateway-list.md +19 -0
- package/docs/docs/cmd/pp/managementapp/managementapp-add.md +12 -0
- package/docs/docs/cmd/pp/managementapp/managementapp-list.md +12 -0
- package/docs/docs/cmd/pp/solution/solution-get.md +14 -0
- package/docs/docs/cmd/pp/solution/solution-list.md +14 -0
- package/docs/docs/cmd/pp/solution/solution-publisher-get.md +20 -1
- package/docs/docs/cmd/pp/solution/solution-publisher-list.md +18 -0
- package/docs/docs/cmd/pp/tenant/tenant-settings-list.md +21 -0
- package/docs/docs/cmd/purview/auditlog/auditlog-list.md +123 -0
- package/docs/docs/cmd/purview/retentionevent/retentionevent-get.md +132 -0
- package/docs/docs/cmd/purview/retentionevent/retentionevent-list.md +107 -0
- package/docs/docs/cmd/purview/retentionevent/retentionevent-remove.md +45 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.md +106 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.md +103 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-list.md +97 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.md +43 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.md +43 -0
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.md +3 -0
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-get.md +3 -0
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-list.md +3 -0
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-remove.md +3 -0
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.md +3 -0
- package/docs/docs/cmd/request.md +74 -0
- package/docs/docs/cmd/spfx/project/project-permissions-grant.md +65 -0
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.md +56 -0
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.md +46 -0
- package/docs/docs/cmd/spo/file/file-sharinglink-list.md +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-set.md +104 -0
- package/docs/docs/cmd/spo/homesite/homesite-get.md +20 -1
- package/docs/docs/cmd/spo/homesite/homesite-remove.md +8 -2
- package/docs/docs/cmd/spo/homesite/homesite-set.md +8 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-connect.md +9 -9
- package/docs/docs/cmd/spo/hubsite/hubsite-data-get.md +34 -5
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +6 -6
- package/docs/docs/cmd/spo/hubsite/hubsite-get.md +36 -19
- package/docs/docs/cmd/spo/hubsite/hubsite-list.md +59 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-register.md +30 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-grant.md +6 -6
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-revoke.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-set.md +40 -15
- package/docs/docs/cmd/spo/hubsite/hubsite-unregister.md +4 -4
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-get.md +7 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-remove.md +9 -3
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.md +8 -2
- package/docs/docs/cmd/spo/list/list-add.md +123 -57
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +50 -5
- package/docs/docs/cmd/spo/list/list-contenttype-default-set.md +4 -4
- package/docs/docs/cmd/spo/list/list-contenttype-list.md +49 -4
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +6 -6
- package/docs/docs/cmd/spo/list/list-get.md +70 -4
- package/docs/docs/cmd/spo/list/list-list.md +70 -2
- package/docs/docs/cmd/spo/list/list-remove.md +6 -6
- package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.md +2 -2
- package/docs/docs/cmd/spo/list/list-retentionlabel-get.md +36 -3
- package/docs/docs/cmd/spo/list/list-retentionlabel-remove.md +3 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-add.md +6 -6
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +3 -3
- package/docs/docs/cmd/spo/list/list-roleinheritance-break.md +9 -9
- package/docs/docs/cmd/spo/list/list-roleinheritance-reset.md +7 -7
- package/docs/docs/cmd/spo/list/list-set.md +61 -61
- package/docs/docs/cmd/spo/list/list-sitescript-get.md +35 -3
- package/docs/docs/cmd/spo/list/list-view-add.md +66 -5
- package/docs/docs/cmd/spo/list/list-view-field-add.md +10 -10
- package/docs/docs/cmd/spo/list/list-view-get.md +61 -0
- package/docs/docs/cmd/spo/list/list-view-list.md +61 -0
- package/docs/docs/cmd/spo/list/list-view-set.md +1 -1
- package/docs/docs/cmd/spo/list/list-webhook-add.md +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-get.md +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-list.md +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-add.md +29 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.md +19 -4
- package/docs/docs/cmd/spo/listitem/listitem-get.md +57 -0
- package/docs/docs/cmd/spo/listitem/listitem-isrecord.md +8 -2
- package/docs/docs/cmd/spo/listitem/listitem-list.md +28 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +15 -0
- package/docs/docs/cmd/spo/listitem/listitem-set.md +30 -0
- package/docs/docs/cmd/spo/navigation/navigation-node-add.md +40 -3
- package/docs/docs/cmd/spo/navigation/navigation-node-get.md +91 -0
- package/docs/docs/cmd/spo/navigation/navigation-node-list.md +30 -0
- package/docs/docs/cmd/spo/navigation/navigation-node-remove.md +1 -1
- package/docs/docs/cmd/spo/navigation/navigation-node-set.md +59 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-add.md +3 -0
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.md +59 -0
- package/docs/docs/cmd/spo/web/web-set.md +9 -0
- package/docs/docs/cmd/status.md +46 -0
- package/docs/docs/cmd/version.md +26 -0
- package/npm-shrinkwrap.json +911 -876
- package/package.json +12 -12
package/dist/utils/spo.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.spo = void 0;
|
|
4
13
|
const url = require("url");
|
|
@@ -9,6 +18,7 @@ const config_1 = require("../config");
|
|
|
9
18
|
const base_permissions_1 = require("../m365/spo/base-permissions");
|
|
10
19
|
const request_1 = require("../request");
|
|
11
20
|
const formatting_1 = require("./formatting");
|
|
21
|
+
const odata_1 = require("./odata");
|
|
12
22
|
exports.spo = {
|
|
13
23
|
getRequestDigest(siteUrl) {
|
|
14
24
|
const requestOptions = {
|
|
@@ -237,6 +247,24 @@ exports.spo = {
|
|
|
237
247
|
});
|
|
238
248
|
});
|
|
239
249
|
},
|
|
250
|
+
/**
|
|
251
|
+
* Returns the Graph id of a site
|
|
252
|
+
* @param webUrl web url e.g. https://contoso.sharepoint.com/sites/site1
|
|
253
|
+
*/
|
|
254
|
+
getSpoGraphSiteId(webUrl) {
|
|
255
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
256
|
+
const url = new URL(webUrl);
|
|
257
|
+
const requestOptions = {
|
|
258
|
+
url: `https://graph.microsoft.com/v1.0/sites/${url.hostname}:${url.pathname}?$select=id`,
|
|
259
|
+
headers: {
|
|
260
|
+
'accept': 'application/json;odata.metadata=none'
|
|
261
|
+
},
|
|
262
|
+
responseType: 'json'
|
|
263
|
+
};
|
|
264
|
+
const result = yield request_1.default.get(requestOptions);
|
|
265
|
+
return result.id;
|
|
266
|
+
});
|
|
267
|
+
},
|
|
240
268
|
/**
|
|
241
269
|
* Ensures the folder path exists
|
|
242
270
|
* @param webFullUrl web full url e.g. https://contoso.sharepoint.com/sites/site1
|
|
@@ -429,6 +457,94 @@ exports.spo = {
|
|
|
429
457
|
reject('Cannot proceed. Folder _ObjectIdentity_ not found'); // this is not suppose to happen
|
|
430
458
|
}, (err) => { reject(err); });
|
|
431
459
|
});
|
|
460
|
+
},
|
|
461
|
+
/**
|
|
462
|
+
* Retrieves the SiteId, VroomItemId and VroomDriveId from a specific file.
|
|
463
|
+
* @param webUrl Web url
|
|
464
|
+
* @param fileId GUID ID of the file
|
|
465
|
+
* @param fileUrl Decoded URL of the file
|
|
466
|
+
*/
|
|
467
|
+
getVroomFileDetails(webUrl, fileId, fileUrl) {
|
|
468
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
469
|
+
let requestUrl = `${webUrl}/_api/web/`;
|
|
470
|
+
if (fileUrl) {
|
|
471
|
+
const fileServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(webUrl, fileUrl);
|
|
472
|
+
requestUrl += `GetFileByServerRelativePath(decodedUrl='${formatting_1.formatting.encodeQueryParameter(fileServerRelativeUrl)}')`;
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
requestUrl += `GetFileById('${fileId}')`;
|
|
476
|
+
}
|
|
477
|
+
requestUrl += '?$select=SiteId,VroomItemId,VroomDriveId';
|
|
478
|
+
const requestOptions = {
|
|
479
|
+
url: requestUrl,
|
|
480
|
+
headers: {
|
|
481
|
+
accept: 'application/json;odata=nometadata'
|
|
482
|
+
},
|
|
483
|
+
responseType: 'json'
|
|
484
|
+
};
|
|
485
|
+
const res = yield request_1.default.get(requestOptions);
|
|
486
|
+
return res;
|
|
487
|
+
});
|
|
488
|
+
},
|
|
489
|
+
/**
|
|
490
|
+
* Retrieves a list of Custom Actions from a SharePoint site.
|
|
491
|
+
* @param webUrl Web url
|
|
492
|
+
* @param scope The scope of custom actions to retrieve, allowed values "Site", "Web" or "All".
|
|
493
|
+
* @param filter An OData filter query to limit the results.
|
|
494
|
+
*/
|
|
495
|
+
getCustomActions(webUrl, scope, filter) {
|
|
496
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
497
|
+
if (scope && scope !== "All" && scope !== "Site" && scope !== "Web") {
|
|
498
|
+
throw `Invalid scope '${scope}'. Allowed values are 'Site', 'Web' or 'All'.`;
|
|
499
|
+
}
|
|
500
|
+
const queryString = filter ? `?$filter=${filter}` : "";
|
|
501
|
+
if (scope && scope !== "All") {
|
|
502
|
+
return yield odata_1.odata.getAllItems(`${webUrl}/_api/${scope}/UserCustomActions${queryString}`);
|
|
503
|
+
}
|
|
504
|
+
const customActions = [
|
|
505
|
+
...yield odata_1.odata.getAllItems(`${webUrl}/_api/Site/UserCustomActions${queryString}`),
|
|
506
|
+
...yield odata_1.odata.getAllItems(`${webUrl}/_api/Web/UserCustomActions${queryString}`)
|
|
507
|
+
];
|
|
508
|
+
return customActions;
|
|
509
|
+
});
|
|
510
|
+
},
|
|
511
|
+
/**
|
|
512
|
+
* Retrieves a Custom Actions from a SharePoint site by Id.
|
|
513
|
+
* @param webUrl Web url
|
|
514
|
+
* @param id The Id of the Custom Action
|
|
515
|
+
* @param scope The scope of custom actions to retrieve, allowed values "Site", "Web" or "All".
|
|
516
|
+
*/
|
|
517
|
+
getCustomActionById(webUrl, id, scope) {
|
|
518
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
519
|
+
if (scope && scope !== "All" && scope !== "Site" && scope !== "Web") {
|
|
520
|
+
throw `Invalid scope '${scope}'. Allowed values are 'Site', 'Web' or 'All'.`;
|
|
521
|
+
}
|
|
522
|
+
function getById(webUrl, id, scope) {
|
|
523
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
524
|
+
const requestOptions = {
|
|
525
|
+
url: `${webUrl}/_api/${scope}/UserCustomActions(guid'${id}')`,
|
|
526
|
+
headers: {
|
|
527
|
+
accept: 'application/json;odata=nometadata'
|
|
528
|
+
},
|
|
529
|
+
responseType: 'json'
|
|
530
|
+
};
|
|
531
|
+
const result = yield request_1.default.get(requestOptions);
|
|
532
|
+
if (result["odata.null"] === true) {
|
|
533
|
+
return undefined;
|
|
534
|
+
}
|
|
535
|
+
return result;
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
if (scope && scope !== "All") {
|
|
539
|
+
return yield getById(webUrl, id, scope);
|
|
540
|
+
}
|
|
541
|
+
const customActionOnWeb = yield getById(webUrl, id, "Web");
|
|
542
|
+
if (customActionOnWeb) {
|
|
543
|
+
return customActionOnWeb;
|
|
544
|
+
}
|
|
545
|
+
const customActionOnSite = yield getById(webUrl, id, "Site");
|
|
546
|
+
return customActionOnSite;
|
|
547
|
+
});
|
|
432
548
|
}
|
|
433
549
|
};
|
|
434
550
|
//# sourceMappingURL=spo.js.map
|
|
@@ -23,6 +23,7 @@ m365 aad app list
|
|
|
23
23
|
## Response
|
|
24
24
|
|
|
25
25
|
=== "JSON"
|
|
26
|
+
|
|
26
27
|
```json
|
|
27
28
|
[
|
|
28
29
|
{
|
|
@@ -136,6 +137,7 @@ m365 aad app list
|
|
|
136
137
|
```
|
|
137
138
|
|
|
138
139
|
=== "Text"
|
|
140
|
+
|
|
139
141
|
```text
|
|
140
142
|
appId id displayName signInAudience
|
|
141
143
|
------------------------------------ ------------------------------------ ----------------------------------------------------------------------- ----------------------------------
|
|
@@ -143,6 +145,7 @@ m365 aad app list
|
|
|
143
145
|
```
|
|
144
146
|
|
|
145
147
|
=== "CSV"
|
|
148
|
+
|
|
146
149
|
```csv
|
|
147
150
|
appId,id,displayName,signInAudience
|
|
148
151
|
61ed4fab-a861-4307-bb87-a6a53dbe39f5,ff2798f7-1c7a-4607-8a7b-3d5e0c18c756,TestAppPermissions,AzureADMyOrg
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# aad user add
|
|
2
|
+
|
|
3
|
+
Creates a new user
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad user add [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`--displayName <displayName>`
|
|
14
|
+
: The name to display in the address book for the user.
|
|
15
|
+
|
|
16
|
+
`--userName <userName>`
|
|
17
|
+
: The user principal name (someuser@contoso.com).
|
|
18
|
+
|
|
19
|
+
`--accountEnabled [accountEnabled]`
|
|
20
|
+
: Whether the account is enabled. Possible values: `true`, `false`. Default value is `true`.
|
|
21
|
+
|
|
22
|
+
`--mailNickname [mailNickname]`
|
|
23
|
+
: The mail alias for the user. By default this value will be extracted from `userName`.
|
|
24
|
+
|
|
25
|
+
`--password [password]`
|
|
26
|
+
: The password for the user. When not specified, a password will be generated.
|
|
27
|
+
|
|
28
|
+
`--firstName [firstName]`
|
|
29
|
+
: The given name (first name) of the user. Maximum length is 64 characters.
|
|
30
|
+
|
|
31
|
+
`--lastName [lastName]`
|
|
32
|
+
: The user's surname (family name or last name). Maximum length is 64 characters.
|
|
33
|
+
|
|
34
|
+
`--forceChangePasswordNextSignIn`
|
|
35
|
+
: Whether the user should change his/her password on the next login.
|
|
36
|
+
|
|
37
|
+
`--forceChangePasswordNextSignInWithMfa`
|
|
38
|
+
: Whether the user should change his/her password on the next login and setup MFA.
|
|
39
|
+
|
|
40
|
+
`--usageLocation [usageLocation]`
|
|
41
|
+
: A two letter [country code](https://learn.microsoft.com/en-us/partner-center/commercial-marketplace-co-sell-location-codes#country-and-region-codes) (ISO standard 3166). Required for users that will be assigned licenses.
|
|
42
|
+
|
|
43
|
+
`--officeLocation [officeLocation]`
|
|
44
|
+
: The office location in the user's place of business.
|
|
45
|
+
|
|
46
|
+
`--jobTitle [jobTitle]`
|
|
47
|
+
: The user's job title. Maximum length is 128 characters.
|
|
48
|
+
|
|
49
|
+
`--companyName [companyName]`
|
|
50
|
+
: The company name which the user is associated. The maximum length is 64 characters.
|
|
51
|
+
|
|
52
|
+
`--department [department]`
|
|
53
|
+
: The name for the department in which the user works. Maximum length is 64 characters.
|
|
54
|
+
|
|
55
|
+
`--preferredLanguage [preferredLanguage]`
|
|
56
|
+
: The preferred language for the user. Should follow [ISO 639-1 Code](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a). Example: `en-US`.
|
|
57
|
+
|
|
58
|
+
`--managerUserId [managerUserId]`
|
|
59
|
+
: User ID of the user's manager. Specify `managerUserId` or `managerUserName` but not both.
|
|
60
|
+
|
|
61
|
+
`--managerUserName [managerUserName]`
|
|
62
|
+
: User principal name of the manager. Specify `managerUserId` or `managerUserName` but not both.
|
|
63
|
+
|
|
64
|
+
--8<-- "docs/cmd/_global.md"
|
|
65
|
+
|
|
66
|
+
## Remarks
|
|
67
|
+
|
|
68
|
+
!!! important
|
|
69
|
+
To use this command you must be a Global administrator, User administrator or Privileged Authentication administrator
|
|
70
|
+
|
|
71
|
+
!!! note
|
|
72
|
+
After running this command, it may take a minute before the user is effectively created in the tenant.
|
|
73
|
+
|
|
74
|
+
## Examples
|
|
75
|
+
|
|
76
|
+
Create a user and let him/her update the password at first login
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
m365 aad user add --displayName "John Doe" --userName "john.doe@contoso.com" --password "SomePassw0rd" --forceChangePasswordNextSignIn
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Create a user with job information
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
m365 aad user add --displayName "John Doe" --userName "john.doe@contoso.com" --password "SomePassw0rd" --firstName John --lastName Doe --jobTitle "Sales Manager" --companyName Contoso --department Sales --officeLocation Vosselaar --forceChangePasswordNextSignIn
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Create a user with language information
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
m365 aad user add --displayName "John Doe" --userName "john.doe@contoso.com" --preferredLanguage "nl-BE" --usageLocation BE --forceChangePasswordNextSignIn
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Create a user with a manager
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
m365 aad user add --displayName "John Doe" --userName "john.doe@contoso.com" --managerUserName "adele@contoso.com"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Response
|
|
101
|
+
|
|
102
|
+
=== "JSON"
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"id": "990e2425-f595-43bc-85ed-b89a44093793",
|
|
107
|
+
"businessPhones": [],
|
|
108
|
+
"displayName": "John Doe",
|
|
109
|
+
"givenName": "John",
|
|
110
|
+
"jobTitle": "Sales Manager",
|
|
111
|
+
"mail": null,
|
|
112
|
+
"mobilePhone": null,
|
|
113
|
+
"officeLocation": "Vosselaar",
|
|
114
|
+
"preferredLanguage": "nl-BE",
|
|
115
|
+
"surname": "Doe",
|
|
116
|
+
"userPrincipalName": "john.doe@contoso.com",
|
|
117
|
+
"password": "SomePassw0rd"
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
=== "Text"
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
businessPhones : []
|
|
125
|
+
displayName : John Doe
|
|
126
|
+
givenName : John
|
|
127
|
+
id : 990e2425-f595-43bc-85ed-b89a44093793
|
|
128
|
+
jobTitle : Sales Manager
|
|
129
|
+
mail : null
|
|
130
|
+
mobilePhone : null
|
|
131
|
+
officeLocation : Vosselaar
|
|
132
|
+
password : SomePassw0rd
|
|
133
|
+
preferredLanguage: nl-BE
|
|
134
|
+
surname : Doe
|
|
135
|
+
userPrincipalName: john.doe@contoso.com
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
=== "CSV"
|
|
139
|
+
|
|
140
|
+
```csv
|
|
141
|
+
id,businessPhones,displayName,givenName,jobTitle,mail,mobilePhone,officeLocation,preferredLanguage,surname,userPrincipalName,password
|
|
142
|
+
990e2425-f595-43bc-85ed-b89a44093793,[],John Doe,John,Sales Manager,,,Vosselaar,nl-BE,Doe,john.doe@contoso.com,SomePassw0rd
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
=== "Markdown"
|
|
146
|
+
|
|
147
|
+
```md
|
|
148
|
+
# aad user add --displayName "John Doe" --userName "john.doe@contoso.com" --password "SomePassw0rd" --firstName "John" --lastName "Doe" --jobTitle "Sales Manager" --officeLocation "Vosselaar" --preferredLanguage "nl-BE"
|
|
149
|
+
|
|
150
|
+
Date: 16/02/2023
|
|
151
|
+
|
|
152
|
+
## John Doe (990e2425-f595-43bc-85ed-b89a44093793)
|
|
153
|
+
|
|
154
|
+
Property | Value
|
|
155
|
+
---------|-------
|
|
156
|
+
id | 990e2425-f595-43bc-85ed-b89a44093793
|
|
157
|
+
businessPhones | []
|
|
158
|
+
displayName | John Doe
|
|
159
|
+
givenName | John
|
|
160
|
+
jobTitle | Sales Manager
|
|
161
|
+
mail | null
|
|
162
|
+
mobilePhone | null
|
|
163
|
+
officeLocation | Vosselaar
|
|
164
|
+
preferredLanguage | nl-BE
|
|
165
|
+
surname | Doe
|
|
166
|
+
userPrincipalName | john.doe@contoso.com
|
|
167
|
+
password | SomePassw0rd
|
|
168
|
+
```
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# aad user license list
|
|
2
|
+
|
|
3
|
+
Lists the license details for a given user
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad user license list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`--userId [userId]`
|
|
14
|
+
: The ID of the user. Specify either `userId` or `userName` but not both.
|
|
15
|
+
|
|
16
|
+
`--userName [userName]`
|
|
17
|
+
: User principal name of the user. Specify either `userId` or `userName` but not both.
|
|
18
|
+
|
|
19
|
+
--8<-- "docs/cmd/_global.md"
|
|
20
|
+
|
|
21
|
+
## Remarks
|
|
22
|
+
|
|
23
|
+
!!! tip
|
|
24
|
+
If you don't specify any option, the command will list the license details of the current logged in user. This does not work when using application permissions.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
List license details of the current logged in user.
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
m365 aad user license list
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
List license details of a specific user by its UPN.
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
m365 aad user license list --userName john.doe@contoso.com
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
List license details of a specific user by its ID.
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
m365 aad user license list --userId 59f80e08-24b1-41f8-8586-16765fd830d3
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Response
|
|
47
|
+
|
|
48
|
+
=== "JSON"
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
[
|
|
52
|
+
{
|
|
53
|
+
"id": "x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw",
|
|
54
|
+
"skuId": "c42b9cae-ea4f-4ab7-9717-81576235ccac",
|
|
55
|
+
"skuPartNumber": "DEVELOPERPACK_E5",
|
|
56
|
+
"servicePlans": [
|
|
57
|
+
{
|
|
58
|
+
"servicePlanId": "7547a3fe-08ee-4ccb-b430-5077c5041653",
|
|
59
|
+
"servicePlanName": "YAMMER_ENTERPRISE",
|
|
60
|
+
"provisioningStatus": "Success",
|
|
61
|
+
"appliesTo": "User"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
=== "Text"
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
id : x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw
|
|
72
|
+
skuId : c42b9cae-ea4f-4ab7-9717-81576235ccac
|
|
73
|
+
skuPartNumber: DEVELOPERPACK_E5
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
=== "CSV"
|
|
77
|
+
|
|
78
|
+
```csv
|
|
79
|
+
id,skuId,skuPartNumber
|
|
80
|
+
x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw,c42b9cae-ea4f-4ab7-9717-81576235ccac,DEVELOPERPACK_E5
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
=== "Markdown"
|
|
84
|
+
|
|
85
|
+
```md
|
|
86
|
+
# aad user license list --userId "0c9c625f-faa9-4c3b-8cd8-d874b869f78c"
|
|
87
|
+
|
|
88
|
+
Date: 2/19/2023
|
|
89
|
+
|
|
90
|
+
## x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw
|
|
91
|
+
|
|
92
|
+
Property | Value
|
|
93
|
+
---------|-------
|
|
94
|
+
id | x4s03usaBkSMs5fbAhyttK6cK8RP6rdKlxeBV2I1zKw
|
|
95
|
+
skuId | c42b9cae-ea4f-4ab7-9717-81576235ccac
|
|
96
|
+
skuPartNumber | DEVELOPERPACK\_E5
|
|
97
|
+
servicePlans | [{"servicePlanId":"7547a3fe-08ee-4ccb-b430-5077c5041653","servicePlanName":"YAMMER\_ENTERPRISE","provisioningStatus":"Success","appliesTo":"User"}]
|
|
98
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# aad user recyclebinitem clear
|
|
2
|
+
|
|
3
|
+
Removes all users from the tenant recycle bin
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad user recyclebinitem clear [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`--confirm`
|
|
14
|
+
: Don't prompt for confirmation.
|
|
15
|
+
|
|
16
|
+
--8<-- "docs/cmd/_global.md"
|
|
17
|
+
|
|
18
|
+
## Remarks
|
|
19
|
+
|
|
20
|
+
!!! important
|
|
21
|
+
To use this command you must be a Global administrator, User administrator or Privileged Authentication administrator.
|
|
22
|
+
|
|
23
|
+
!!! note
|
|
24
|
+
After running this command, it may take a minute before all deleted users are effectively removed from the tenant.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
Removes all users from the tenant recycle bin
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
m365 aad user recyclebinitem clear
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Removes all users from the tenant recycle bin without confirmation prompt
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
m365 aad user recyclebinitem clear --confirm
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Response
|
|
41
|
+
|
|
42
|
+
The command won't return a response on success.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# aad user recyclebinitem list
|
|
2
|
+
|
|
3
|
+
Lists users from the recycle bin in the current tenant
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad user recyclebinitem list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
--8<-- "docs/cmd/_global.md"
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
List all removed users
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
m365 aad user recyclebinitem list
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Response
|
|
24
|
+
|
|
25
|
+
=== "JSON"
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
[
|
|
29
|
+
{
|
|
30
|
+
"businessPhones": [],
|
|
31
|
+
"displayName": "John Doe",
|
|
32
|
+
"givenName": "John Doe",
|
|
33
|
+
"jobTitle": "Developer",
|
|
34
|
+
"mail": "john@contoso.com",
|
|
35
|
+
"mobilePhone": "0476345130",
|
|
36
|
+
"officeLocation": "Washington",
|
|
37
|
+
"preferredLanguage": "nl-BE",
|
|
38
|
+
"surname": "John",
|
|
39
|
+
"userPrincipalName": "7e06b56615f340138bf879874d52e68ajohn@contoso.com",
|
|
40
|
+
"id": "7e06b566-15f3-4013-8bf8-79874d52e68a"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
=== "Text"
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
id displayName userPrincipalName
|
|
49
|
+
------------------------------------ ----------- -----------------------------------------------
|
|
50
|
+
7e06b566-15f3-4013-8bf8-79874d52e68a John Doe 7e06b56615f340138bf879874d52e68ajohn@contoso.com
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
=== "CSV"
|
|
54
|
+
|
|
55
|
+
```csv
|
|
56
|
+
id,displayName,userPrincipalName
|
|
57
|
+
7e06b566-15f3-4013-8bf8-79874d52e68a,John Doe,7e06b56615f340138bf879874d52e68ajohn@contoso.com
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
=== "Markdown"
|
|
61
|
+
|
|
62
|
+
```md
|
|
63
|
+
# aad user recyclebinitem list
|
|
64
|
+
|
|
65
|
+
Date: 14/02/2023
|
|
66
|
+
|
|
67
|
+
## John Doe (7e06b566-15f3-4013-8bf8-79874d52e68a)
|
|
68
|
+
|
|
69
|
+
Property | Value
|
|
70
|
+
---------|-------
|
|
71
|
+
businessPhones | []
|
|
72
|
+
displayName | John Doe
|
|
73
|
+
givenName | John Doe
|
|
74
|
+
jobTitle | Developer
|
|
75
|
+
mail | john@contoso.com
|
|
76
|
+
mobilePhone | 0476345130
|
|
77
|
+
officeLocation | Washington
|
|
78
|
+
preferredLanguage | nl-BE
|
|
79
|
+
surname | John
|
|
80
|
+
userPrincipalName | 7e06b56615f340138bf879874d52e68ajohn@contoso.com
|
|
81
|
+
id | 7e06b566-15f3-4013-8bf8-79874d52e68a
|
|
82
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# aad user recyclebinitem remove
|
|
2
|
+
|
|
3
|
+
Removes a user from the recycle bin in the current tenant
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad user recyclebinitem remove [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`--id <id>`
|
|
14
|
+
: ID of the deleted user.
|
|
15
|
+
|
|
16
|
+
`--confirm`
|
|
17
|
+
: Don't prompt for confirmation.
|
|
18
|
+
|
|
19
|
+
--8<-- "docs/cmd/_global.md"
|
|
20
|
+
|
|
21
|
+
## Remarks
|
|
22
|
+
|
|
23
|
+
!!! important
|
|
24
|
+
To use this command you must be a Global administrator, User administrator or Privileged Authentication administrator.
|
|
25
|
+
|
|
26
|
+
!!! note
|
|
27
|
+
After running this command, it may take a minute before the deleted user is effectively removed from the tenant.
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
Removes a specific user from the recycle bin
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
m365 aad user recyclebinitem remove --id 59f80e08-24b1-41f8-8586-16765fd830d3
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Removes a specific user from the recycle bin without confirmation prompt
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
m365 aad user recyclebinitem remove --id 59f80e08-24b1-41f8-8586-16765fd830d3 --confirm
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Response
|
|
44
|
+
|
|
45
|
+
The command won't return a response on success.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# aad user remove
|
|
2
|
+
|
|
3
|
+
Removes a specific user
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad user remove [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`--id [id]`
|
|
14
|
+
: The ID of the user. Specify either `id` or `userName` but not both.
|
|
15
|
+
|
|
16
|
+
`--userName [userName]`
|
|
17
|
+
: User principal name of the user. Specify either `id` or `userName` but not both.
|
|
18
|
+
|
|
19
|
+
`--confirm`
|
|
20
|
+
: Don't prompt for confirmation.
|
|
21
|
+
|
|
22
|
+
--8<-- "docs/cmd/_global.md"
|
|
23
|
+
|
|
24
|
+
## Remarks
|
|
25
|
+
|
|
26
|
+
!!! important
|
|
27
|
+
If the user with the specified id or user name doesn't exist, you will get a `Resource 'xyz' does not exist or one of its queried reference-property objects are not present.` error.
|
|
28
|
+
|
|
29
|
+
!!! important
|
|
30
|
+
To use this command you must be a Global administrator, User administrator or Privileged Authentication administrator.
|
|
31
|
+
|
|
32
|
+
!!! note
|
|
33
|
+
After running this command, it may take a minute before the user is effectively moved to the recycle bin.
|
|
34
|
+
|
|
35
|
+
## Examples
|
|
36
|
+
|
|
37
|
+
Removes a specific user by id
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
m365 aad user remove --id a33bd401-9117-4e0e-bb7b-3f61c1539e10
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Removes a specific user by its UPN
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
m365 aad user remove --name john.doe@contoso.com
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Response
|
|
50
|
+
|
|
51
|
+
The command won't return a response on success.
|
|
@@ -74,7 +74,7 @@ m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --accountEnabl
|
|
|
74
74
|
Reset password of a given user by userPrincipalName and require the user to change the password on the next sign in
|
|
75
75
|
|
|
76
76
|
```sh
|
|
77
|
-
m365 aad user set --userPrincipalName steve@contoso.onmicrosoft.com --resetPassword --
|
|
77
|
+
m365 aad user set --userPrincipalName steve@contoso.onmicrosoft.com --resetPassword --newPassword 6NLUId79Lc24 --forceChangePasswordNextSignIn
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
Change password of the currently logged in user
|
|
@@ -83,6 +83,6 @@ Change password of the currently logged in user
|
|
|
83
83
|
m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --currentPassword SLBF5gnRtyYc --newPassword 6NLUId79Lc24
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
## Response
|
|
87
87
|
|
|
88
88
|
The command won't return a response on success.
|