@pnp/cli-microsoft365 6.9.0-beta.d8f8efb → 6.9.0-beta.ef7c408
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/.devcontainer/Dockerfile +12 -19
- package/.devcontainer/devcontainer.json +24 -17
- package/Dockerfile +3 -1
- package/dist/Auth.js +2 -8
- package/dist/AuthServer.js +2 -4
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +23 -24
- package/dist/m365/aad/commands/o365group/o365group-set.js +15 -20
- package/dist/m365/aad/commands/sp/sp-list.js +78 -0
- package/dist/m365/aad/commands.js +1 -0
- package/dist/m365/app/commands/app-open.js +4 -14
- package/dist/m365/cli/commands/cli-issue.js +4 -10
- package/dist/m365/cli/commands/cli-reconsent.js +2 -8
- package/dist/m365/commands/docs.js +2 -8
- package/dist/m365/commands/setupPresets.js +2 -0
- package/dist/m365/flow/commands/flow-list.js +30 -12
- package/dist/m365/flow/commands/flow-remove.js +2 -3
- package/dist/m365/flow/commands/run/run-resubmit.js +11 -10
- package/dist/m365/outlook/commands/message/message-list.js +18 -23
- package/dist/m365/outlook/commands/message/message-move.js +15 -20
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +19 -20
- package/dist/m365/spo/commands/file/file-checkout-undo.js +119 -0
- package/dist/m365/spo/commands/list/list-add.js +1 -1
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/util/commands/accesstoken/accesstoken-get.js +10 -7
- package/dist/utils/browserUtil.js +23 -0
- package/docs/docs/cmd/aad/sp/sp-list.mdx +162 -0
- package/docs/docs/cmd/flow/flow-list.mdx +15 -0
- package/docs/docs/cmd/setup.mdx +2 -0
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +55 -0
- package/docs/docs/cmd/util/accesstoken/accesstoken-get.mdx +12 -2
- package/npm-shrinkwrap.json +299 -272
- package/package.json +17 -17
|
@@ -77,16 +77,17 @@ class FlowRunResubmitCommand extends AzmgmtCommand_1.default {
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
getTriggerName(environment, flow) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
.get(requestOptions)
|
|
89
|
-
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const requestOptions = {
|
|
82
|
+
url: `${this.resource}providers/Microsoft.ProcessSimple/environments/${formatting_1.formatting.encodeQueryParameter(environment)}/flows/${formatting_1.formatting.encodeQueryParameter(flow)}/triggers?api-version=2016-11-01`,
|
|
83
|
+
headers: {
|
|
84
|
+
accept: 'application/json'
|
|
85
|
+
},
|
|
86
|
+
responseType: 'json'
|
|
87
|
+
};
|
|
88
|
+
const res = yield request_1.default.get(requestOptions);
|
|
89
|
+
return res.value[0].name;
|
|
90
|
+
});
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
_FlowRunResubmitCommand_instances = new WeakSet(), _FlowRunResubmitCommand_initTelemetry = function _FlowRunResubmitCommand_initTelemetry() {
|
|
@@ -53,16 +53,16 @@ class OutlookMessageListCommand extends GraphCommand_1.default {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
getFolderId(args) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
if (!args.options.folderId && !args.options.folderName) {
|
|
58
|
+
return '';
|
|
59
|
+
}
|
|
60
|
+
if (args.options.folderId) {
|
|
61
|
+
return args.options.folderId;
|
|
62
|
+
}
|
|
63
|
+
if (Outlook_1.Outlook.wellKnownFolderNames.indexOf(args.options.folderName) > -1) {
|
|
64
|
+
return args.options.folderName;
|
|
65
|
+
}
|
|
66
66
|
const requestOptions = {
|
|
67
67
|
url: `${this.resource}/v1.0/me/mailFolders?$filter=displayName eq '${formatting_1.formatting.encodeQueryParameter(args.options.folderName)}'&$select=id`,
|
|
68
68
|
headers: {
|
|
@@ -70,19 +70,14 @@ class OutlookMessageListCommand extends GraphCommand_1.default {
|
|
|
70
70
|
},
|
|
71
71
|
responseType: 'json'
|
|
72
72
|
};
|
|
73
|
-
request_1.default
|
|
74
|
-
|
|
75
|
-
.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
if (response.value.length > 1) {
|
|
83
|
-
return reject(`Multiple folders with name '${args.options.folderName}' found. Please disambiguate:${os.EOL}${response.value.map(f => `- ${f.id}`).join(os.EOL)}`);
|
|
84
|
-
}
|
|
85
|
-
}, err => reject(err));
|
|
73
|
+
const response = yield request_1.default.get(requestOptions);
|
|
74
|
+
if (response.value.length === 0) {
|
|
75
|
+
throw `Folder with name '${args.options.folderName}' not found`;
|
|
76
|
+
}
|
|
77
|
+
if (response.value.length > 1) {
|
|
78
|
+
throw `Multiple folders with name '${args.options.folderName}' found. Please disambiguate:${os.EOL}${response.value.map(f => `- ${f.id}`).join(os.EOL)}`;
|
|
79
|
+
}
|
|
80
|
+
return response.value[0].id;
|
|
86
81
|
});
|
|
87
82
|
}
|
|
88
83
|
}
|
|
@@ -61,13 +61,13 @@ class OutlookMessageMoveCommand extends GraphCommand_1.default {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
getFolderId(folderId, folderName) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
if (folderId) {
|
|
66
|
+
return folderId;
|
|
67
|
+
}
|
|
68
|
+
if (Outlook_1.Outlook.wellKnownFolderNames.indexOf(folderName) > -1) {
|
|
69
|
+
return folderName;
|
|
70
|
+
}
|
|
71
71
|
const requestOptions = {
|
|
72
72
|
url: `${this.resource}/v1.0/me/mailFolders?$filter=displayName eq '${formatting_1.formatting.encodeQueryParameter(folderName)}'&$select=id`,
|
|
73
73
|
headers: {
|
|
@@ -75,19 +75,14 @@ class OutlookMessageMoveCommand extends GraphCommand_1.default {
|
|
|
75
75
|
},
|
|
76
76
|
responseType: 'json'
|
|
77
77
|
};
|
|
78
|
-
request_1.default
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
if (response.value.length > 1) {
|
|
88
|
-
return reject(`Multiple folders with name '${folderName}' found. Please disambiguate:${os.EOL}${response.value.map(f => `- ${f.id}`).join(os.EOL)}`);
|
|
89
|
-
}
|
|
90
|
-
}, err => reject(err));
|
|
78
|
+
const response = yield request_1.default.get(requestOptions);
|
|
79
|
+
if (response.value.length === 0) {
|
|
80
|
+
throw `Folder with name '${folderName}' not found`;
|
|
81
|
+
}
|
|
82
|
+
if (response.value.length > 1) {
|
|
83
|
+
throw `Multiple folders with name '${folderName}' found. Please disambiguate:${os.EOL}${response.value.map(f => `- ${f.id}`).join(os.EOL)}`;
|
|
84
|
+
}
|
|
85
|
+
return response.value[0].id;
|
|
91
86
|
});
|
|
92
87
|
}
|
|
93
88
|
}
|
|
@@ -56,31 +56,30 @@ class PpManagementAppAddCommand extends PowerPlatformCommand_1.default {
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
getAppId(args) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
.get((requestOptions))
|
|
75
|
-
.then((aadApps) => {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
if (args.options.appId) {
|
|
61
|
+
return args.options.appId;
|
|
62
|
+
}
|
|
63
|
+
const { objectId, name } = args.options;
|
|
64
|
+
const filter = objectId ?
|
|
65
|
+
`id eq '${formatting_1.formatting.encodeQueryParameter(objectId)}'` :
|
|
66
|
+
`displayName eq '${formatting_1.formatting.encodeQueryParameter(name)}'`;
|
|
67
|
+
const requestOptions = {
|
|
68
|
+
url: `https://graph.microsoft.com/v1.0/myorganization/applications?$filter=${filter}&$select=appId`,
|
|
69
|
+
headers: {
|
|
70
|
+
accept: 'application/json;odata.metadata=none'
|
|
71
|
+
},
|
|
72
|
+
responseType: 'json'
|
|
73
|
+
};
|
|
74
|
+
const aadApps = yield request_1.default.get((requestOptions));
|
|
76
75
|
if (aadApps.value.length === 0) {
|
|
77
76
|
const applicationIdentifier = objectId ? `ID ${objectId}` : `name ${name}`;
|
|
78
|
-
|
|
77
|
+
throw `No Azure AD application registration with ${applicationIdentifier} found`;
|
|
79
78
|
}
|
|
80
79
|
if (aadApps.value.length === 1 && aadApps.value[0].appId) {
|
|
81
|
-
return
|
|
80
|
+
return aadApps.value[0].appId;
|
|
82
81
|
}
|
|
83
|
-
|
|
82
|
+
throw `Multiple Azure AD application registration with name ${name} found. Please disambiguate (app IDs): ${aadApps.value.map(a => a.appId).join(', ')}`;
|
|
84
83
|
});
|
|
85
84
|
}
|
|
86
85
|
}
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
};
|
|
11
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _SpoFileCheckoutUndoCommand_instances, _SpoFileCheckoutUndoCommand_initTelemetry, _SpoFileCheckoutUndoCommand_initOptions, _SpoFileCheckoutUndoCommand_initValidators, _SpoFileCheckoutUndoCommand_initOptionSets;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
19
|
+
const request_1 = require("../../../../request");
|
|
20
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
21
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
22
|
+
const validation_1 = require("../../../../utils/validation");
|
|
23
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
24
|
+
const commands_1 = require("../../commands");
|
|
25
|
+
class SpoFileCheckoutUndoCommand extends SpoCommand_1.default {
|
|
26
|
+
get name() {
|
|
27
|
+
return commands_1.default.FILE_CHECKOUT_UNDO;
|
|
28
|
+
}
|
|
29
|
+
get description() {
|
|
30
|
+
return 'Discards a checked out file';
|
|
31
|
+
}
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
_SpoFileCheckoutUndoCommand_instances.add(this);
|
|
35
|
+
__classPrivateFieldGet(this, _SpoFileCheckoutUndoCommand_instances, "m", _SpoFileCheckoutUndoCommand_initTelemetry).call(this);
|
|
36
|
+
__classPrivateFieldGet(this, _SpoFileCheckoutUndoCommand_instances, "m", _SpoFileCheckoutUndoCommand_initOptions).call(this);
|
|
37
|
+
__classPrivateFieldGet(this, _SpoFileCheckoutUndoCommand_instances, "m", _SpoFileCheckoutUndoCommand_initValidators).call(this);
|
|
38
|
+
__classPrivateFieldGet(this, _SpoFileCheckoutUndoCommand_instances, "m", _SpoFileCheckoutUndoCommand_initOptionSets).call(this);
|
|
39
|
+
}
|
|
40
|
+
commandAction(logger, args) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const undoCheckout = () => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
try {
|
|
44
|
+
if (this.verbose) {
|
|
45
|
+
logger.logToStderr(`Undoing checkout for file ${args.options.fileId || args.options.fileUrl} on web ${args.options.webUrl}`);
|
|
46
|
+
}
|
|
47
|
+
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
48
|
+
if (args.options.fileId) {
|
|
49
|
+
requestUrl += `getFileById('${args.options.fileId}')`;
|
|
50
|
+
}
|
|
51
|
+
else if (args.options.fileUrl) {
|
|
52
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.fileUrl);
|
|
53
|
+
requestUrl += `getFileByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')`;
|
|
54
|
+
}
|
|
55
|
+
requestUrl += '/undocheckout';
|
|
56
|
+
const requestOptions = {
|
|
57
|
+
url: requestUrl,
|
|
58
|
+
headers: {
|
|
59
|
+
'accept': 'application/json;odata=nometadata'
|
|
60
|
+
},
|
|
61
|
+
responseType: 'json'
|
|
62
|
+
};
|
|
63
|
+
yield request_1.default.post(requestOptions);
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
this.handleRejectedODataJsonPromise(err);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
if (args.options.confirm) {
|
|
70
|
+
yield undoCheckout();
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
const result = yield Cli_1.Cli.prompt({
|
|
74
|
+
type: 'confirm',
|
|
75
|
+
name: 'continue',
|
|
76
|
+
default: false,
|
|
77
|
+
message: `Are you sure you want to undo the checkout for file ${args.options.fileId || args.options.fileUrl} ?`
|
|
78
|
+
});
|
|
79
|
+
if (result.continue) {
|
|
80
|
+
yield undoCheckout();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
_SpoFileCheckoutUndoCommand_instances = new WeakSet(), _SpoFileCheckoutUndoCommand_initTelemetry = function _SpoFileCheckoutUndoCommand_initTelemetry() {
|
|
87
|
+
this.telemetry.push((args) => {
|
|
88
|
+
Object.assign(this.telemetryProperties, {
|
|
89
|
+
fileId: typeof args.options.fileId !== 'undefined',
|
|
90
|
+
fileUrl: typeof args.options.fileUrl !== 'undefined',
|
|
91
|
+
confirm: !!args.options.confirm
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
}, _SpoFileCheckoutUndoCommand_initOptions = function _SpoFileCheckoutUndoCommand_initOptions() {
|
|
95
|
+
this.options.unshift({
|
|
96
|
+
option: '-u, --webUrl <webUrl>'
|
|
97
|
+
}, {
|
|
98
|
+
option: '-f, --fileUrl [fileUrl]'
|
|
99
|
+
}, {
|
|
100
|
+
option: '-i, --fileId [fileId]'
|
|
101
|
+
}, {
|
|
102
|
+
option: '--confirm'
|
|
103
|
+
});
|
|
104
|
+
}, _SpoFileCheckoutUndoCommand_initValidators = function _SpoFileCheckoutUndoCommand_initValidators() {
|
|
105
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
107
|
+
if (isValidSharePointUrl !== true) {
|
|
108
|
+
return isValidSharePointUrl;
|
|
109
|
+
}
|
|
110
|
+
if (args.options.fileId && !validation_1.validation.isValidGuid(args.options.fileId)) {
|
|
111
|
+
return `${args.options.fileId} is not a valid GUID`;
|
|
112
|
+
}
|
|
113
|
+
return true;
|
|
114
|
+
}));
|
|
115
|
+
}, _SpoFileCheckoutUndoCommand_initOptionSets = function _SpoFileCheckoutUndoCommand_initOptionSets() {
|
|
116
|
+
this.optionSets.push({ options: ['fileId', 'fileUrl'] });
|
|
117
|
+
};
|
|
118
|
+
module.exports = new SpoFileCheckoutUndoCommand();
|
|
119
|
+
//# sourceMappingURL=file-checkout-undo.js.map
|
|
@@ -582,7 +582,7 @@ _SpoListAddCommand_instances = new WeakSet(), _SpoListAddCommand_initTelemetry =
|
|
|
582
582
|
return true;
|
|
583
583
|
}));
|
|
584
584
|
}, _SpoListAddCommand_initTypes = function _SpoListAddCommand_initTypes() {
|
|
585
|
-
this.types.string.push('baseTemplate', 'webUrl', 'templateFeatureId', 'defaultContentApprovalWorkflowId', 'draftVersionVisibility', 'listExperienceOptions');
|
|
585
|
+
this.types.string.push('title', 'baseTemplate', 'webUrl', 'templateFeatureId', 'defaultContentApprovalWorkflowId', 'draftVersionVisibility', 'listExperienceOptions');
|
|
586
586
|
this.types.boolean.push(...SpoListAddCommand.booleanOptions);
|
|
587
587
|
};
|
|
588
588
|
SpoListAddCommand.booleanOptions = [
|
|
@@ -61,6 +61,7 @@ exports.default = {
|
|
|
61
61
|
FILE_ADD: `${prefix} file add`,
|
|
62
62
|
FILE_CHECKIN: `${prefix} file checkin`,
|
|
63
63
|
FILE_CHECKOUT: `${prefix} file checkout`,
|
|
64
|
+
FILE_CHECKOUT_UNDO: `${prefix} file checkout undo`,
|
|
64
65
|
FILE_COPY: `${prefix} file copy`,
|
|
65
66
|
FILE_GET: `${prefix} file get`,
|
|
66
67
|
FILE_LIST: `${prefix} file list`,
|
|
@@ -34,15 +34,18 @@ class UtilAccessTokenGetCommand extends Command_1.default {
|
|
|
34
34
|
commandAction(logger, args) {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
36
|
let resource = args.options.resource;
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
37
|
+
try {
|
|
38
|
+
if (resource.toLowerCase() === 'sharepoint') {
|
|
39
|
+
if (Auth_1.default.service.spoUrl) {
|
|
40
|
+
resource = Auth_1.default.service.spoUrl;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw `SharePoint URL undefined. Use the 'm365 spo set --url https://contoso.sharepoint.com' command to set the URL`;
|
|
44
|
+
}
|
|
40
45
|
}
|
|
41
|
-
else {
|
|
42
|
-
|
|
46
|
+
else if (resource.toLowerCase() === 'graph') {
|
|
47
|
+
resource = Auth_1.Auth.getEndpointForResource('https://graph.microsoft.com', Auth_1.default.service.cloudType);
|
|
43
48
|
}
|
|
44
|
-
}
|
|
45
|
-
try {
|
|
46
49
|
const accessToken = yield Auth_1.default.ensureAccessToken(resource, logger, this.debug, args.options.new);
|
|
47
50
|
logger.log(accessToken);
|
|
48
51
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.browserUtil = void 0;
|
|
13
|
+
exports.browserUtil = {
|
|
14
|
+
/* c8 ignore next 5 */
|
|
15
|
+
open(url) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
const _open = require('open');
|
|
18
|
+
const runningOnWindows = process.platform === 'win32';
|
|
19
|
+
yield _open(url, { wait: runningOnWindows });
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=browserUtil.js.map
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# aad sp list
|
|
6
|
+
|
|
7
|
+
Lists the service principals in the directory
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 aad sp list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`--displayName [displayName]`
|
|
19
|
+
: Returns only service principals with the specified name
|
|
20
|
+
|
|
21
|
+
`--tag [tag]`
|
|
22
|
+
: Returns only service principals with the specified tag
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<Global />
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
Return a list of all service principals
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 aad sp list
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Return a list of all service principals that comply with the display name and the tag parameters
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 aad sp list --displayName "My custom service principal" --tag "WindowsAzureActiveDirectoryIntegratedApp"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Response
|
|
42
|
+
|
|
43
|
+
<Tabs>
|
|
44
|
+
<TabItem value="JSON">
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
[
|
|
48
|
+
{
|
|
49
|
+
"id": "226859cc-86f0-40d3-b308-f43b3a729b6e",
|
|
50
|
+
"deletedDateTime": null,
|
|
51
|
+
"accountEnabled": true,
|
|
52
|
+
"alternativeNames": [],
|
|
53
|
+
"appDisplayName": "My custom service principal",
|
|
54
|
+
"appDescription": null,
|
|
55
|
+
"appId": "a62ef842-f9ef-49cf-9119-31b85ea58445",
|
|
56
|
+
"applicationTemplateId": null,
|
|
57
|
+
"appOwnerOrganizationId": "fd71909b-55e5-44d2-9f78-dc432421d527",
|
|
58
|
+
"appRoleAssignmentRequired": false,
|
|
59
|
+
"createdDateTime": "2022-11-28T20:32:11Z",
|
|
60
|
+
"description": null,
|
|
61
|
+
"disabledByMicrosoftStatus": null,
|
|
62
|
+
"displayName": "My custom service principal",
|
|
63
|
+
"homepage": null,
|
|
64
|
+
"loginUrl": null,
|
|
65
|
+
"logoutUrl": null,
|
|
66
|
+
"notes": null,
|
|
67
|
+
"notificationEmailAddresses": [],
|
|
68
|
+
"preferredSingleSignOnMode": null,
|
|
69
|
+
"preferredTokenSigningKeyThumbprint": null,
|
|
70
|
+
"replyUrls": [
|
|
71
|
+
"urn:ietf:wg:oauth:2.0:oob",
|
|
72
|
+
"https://localhost",
|
|
73
|
+
"http://localhost",
|
|
74
|
+
"http://localhost:8400"
|
|
75
|
+
],
|
|
76
|
+
"servicePrincipalNames": [
|
|
77
|
+
"https://contoso.onmicrosoft.com/907a8cea-411a-461a-bb30-261e52febcca",
|
|
78
|
+
"907a8cea-411a-461a-bb30-261e52febcca"
|
|
79
|
+
],
|
|
80
|
+
"servicePrincipalType": "Application",
|
|
81
|
+
"signInAudience": "AzureADMultipleOrgs",
|
|
82
|
+
"tags": [
|
|
83
|
+
"WindowsAzureActiveDirectoryIntegratedApp"
|
|
84
|
+
],
|
|
85
|
+
"tokenEncryptionKeyId": null,
|
|
86
|
+
"samlSingleSignOnSettings": null,
|
|
87
|
+
"addIns": [],
|
|
88
|
+
"appRoles": [],
|
|
89
|
+
"info": {
|
|
90
|
+
"logoUrl": null,
|
|
91
|
+
"marketingUrl": null,
|
|
92
|
+
"privacyStatementUrl": null,
|
|
93
|
+
"supportUrl": null,
|
|
94
|
+
"termsOfServiceUrl": null
|
|
95
|
+
},
|
|
96
|
+
"keyCredentials": [],
|
|
97
|
+
"oauth2PermissionScopes": [
|
|
98
|
+
{
|
|
99
|
+
"adminConsentDescription": "Allow the application to access My custom service principal on behalf of the signed-in user.",
|
|
100
|
+
"adminConsentDisplayName": "Access My custom service principal",
|
|
101
|
+
"id": "907a8cea-411a-461a-bb30-261e52febcca",
|
|
102
|
+
"isEnabled": true,
|
|
103
|
+
"type": "User",
|
|
104
|
+
"userConsentDescription": "Allow the application to access My custom service principal on your behalf.",
|
|
105
|
+
"userConsentDisplayName": "Access My custom service principal",
|
|
106
|
+
"value": "user_impersonation"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"passwordCredentials": [],
|
|
110
|
+
"resourceSpecificApplicationPermissions": [],
|
|
111
|
+
"verifiedPublisher": {
|
|
112
|
+
"displayName": null,
|
|
113
|
+
"verifiedPublisherId": null,
|
|
114
|
+
"addedDateTime": null
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
</TabItem>
|
|
121
|
+
<TabItem value="Text">
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
id displayName tag
|
|
125
|
+
-------------------------------------- ---------------------------- ---------------------------------------
|
|
126
|
+
a62ef842-f9ef-49cf-9119-31b85ea58445 My custom service principal WindowsAzureActiveDirectoryIntegratedApp
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</TabItem>
|
|
130
|
+
<TabItem value="CSV">
|
|
131
|
+
|
|
132
|
+
```csv
|
|
133
|
+
id,accountEnabled,appDisplayName,appId,appOwnerOrganizationId,appRoleAssignmentRequired,createdDateTime,displayName,servicePrincipalType,signInAudience
|
|
134
|
+
226859cc-86f0-40d3-b308-f43b3a729b6e,1,My custom service principal,a62ef842-f9ef-49cf-9119-31b85ea58445,fd71909b-55e5-44d2-9f78-dc432421d527,,2022-11-28T20:32:11Z,My custom service principal,AzureADMultipleOrgs
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
</TabItem>
|
|
138
|
+
<TabItem value="Markdown">
|
|
139
|
+
|
|
140
|
+
```md
|
|
141
|
+
# aad sp list
|
|
142
|
+
|
|
143
|
+
Date: 27/4/2023
|
|
144
|
+
|
|
145
|
+
## My custom service principal (226859cc-86f0-40d3-b308-f43b3a729b6e)
|
|
146
|
+
|
|
147
|
+
Property | Value
|
|
148
|
+
---------|-------
|
|
149
|
+
id | 226859cc-86f0-40d3-b308-f43b3a729b6e
|
|
150
|
+
accountEnabled | true
|
|
151
|
+
appDisplayName | My custom service principal
|
|
152
|
+
appId | a62ef842-f9ef-49cf-9119-31b85ea58445
|
|
153
|
+
appOwnerOrganizationId | fd71909b-55e5-44d2-9f78-dc432421d527
|
|
154
|
+
appRoleAssignmentRequired | false
|
|
155
|
+
createdDateTime | 2022-11-28T20:32:11Z
|
|
156
|
+
displayName | My custom service principal
|
|
157
|
+
servicePrincipalType | Application
|
|
158
|
+
signInAudience | AzureADMultipleOrg
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
</TabItem>
|
|
162
|
+
</Tabs>
|
|
@@ -21,6 +21,9 @@ m365 flow list [options]
|
|
|
21
21
|
`--sharingStatus [sharingStatus]`
|
|
22
22
|
: List a specific type of flows. Valid values: `ownedByMe`, `personal`, `sharedWithMe`, `all`. Defaults to `ownedByMe`. Don't specify this option when using asAdmin.
|
|
23
23
|
|
|
24
|
+
`--includeSolutions`
|
|
25
|
+
: Include flows from solutions.
|
|
26
|
+
|
|
24
27
|
`--asAdmin`
|
|
25
28
|
: Set, to list all Flows as admin. Otherwise will return only your own flows.
|
|
26
29
|
```
|
|
@@ -58,6 +61,18 @@ List all flows in the given environment
|
|
|
58
61
|
m365 flow list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --asAdmin
|
|
59
62
|
```
|
|
60
63
|
|
|
64
|
+
List all flows that are shared with the current user
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
m365 flow list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --sharingStatus sharedWithMe
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
List all personal flows and include flows from solutions
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
m365 flow list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --sharingStatus personal --includeSolutions
|
|
74
|
+
```
|
|
75
|
+
|
|
61
76
|
## Response
|
|
62
77
|
|
|
63
78
|
### Standard response
|
package/docs/docs/cmd/setup.mdx
CHANGED
|
@@ -49,6 +49,7 @@ The `m365 setup` command uses the following presets:
|
|
|
49
49
|
- interactive use:
|
|
50
50
|
- autoOpenLinksInBrowser: true,
|
|
51
51
|
- copyDeviceCodeToClipboard: true,
|
|
52
|
+
- interactive: true,
|
|
52
53
|
- output: 'text',
|
|
53
54
|
- printErrorsAsPlainText: true,
|
|
54
55
|
- prompt: true,
|
|
@@ -57,6 +58,7 @@ The `m365 setup` command uses the following presets:
|
|
|
57
58
|
- scripting use:
|
|
58
59
|
- autoOpenLinksInBrowser: false,
|
|
59
60
|
- copyDeviceCodeToClipboard: false,
|
|
61
|
+
- interactive: false,
|
|
60
62
|
- output: 'json',
|
|
61
63
|
- printErrorsAsPlainText: false,
|
|
62
64
|
- prompt: false,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# spo file checkout undo
|
|
4
|
+
|
|
5
|
+
Discards a checked out file
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 spo file checkout undo [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-u, --webUrl <webUrl>`
|
|
17
|
+
: The URL of the site where the file is located.
|
|
18
|
+
|
|
19
|
+
`-f, --fileUrl [fileUrl]`
|
|
20
|
+
: The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
|
|
21
|
+
|
|
22
|
+
`-i, --fileId [fileId]`
|
|
23
|
+
: The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
|
|
24
|
+
|
|
25
|
+
`--confirm`
|
|
26
|
+
: Don't prompt for confirmation.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
<Global />
|
|
30
|
+
|
|
31
|
+
## Remarks
|
|
32
|
+
|
|
33
|
+
:::info
|
|
34
|
+
|
|
35
|
+
When specifying option `fileUrl`, make sure that the URL is decoded. If not, you will get a `File Not Found` error.
|
|
36
|
+
|
|
37
|
+
:::
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
Discards a checked-out file with a specific ID.
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 spo file checkout undo --webUrl https://contoso.sharepoint.com/sites/project-x --fileId 'b2307a39-e878-458b-bc90-03bc578531d6'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Discards a checked-out file with a specific URL without prompting for confirmation.
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 spo file checkout undo --webUrl https://contoso.sharepoint.com/sites/project-x --fileUrl '/sites/project-x/documents/Test1.docx' --confirm
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Response
|
|
54
|
+
|
|
55
|
+
The command won't return a response on success.
|