@pnp/cli-microsoft365 10.0.0-beta.787c5f1 → 10.0.0-beta.7be7794
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +6 -4
- package/dist/AuthServer.js +7 -7
- package/dist/api.js +1 -1
- package/dist/config.js +1 -0
- package/dist/m365/cli/commands/cli-doctor.js +2 -2
- package/dist/m365/cli/commands.js +1 -2
- package/dist/m365/commands/login.js +120 -67
- package/dist/m365/entra/commands/group/{group-user-add.js → group-member-add.js} +18 -18
- package/dist/m365/entra/commands/group/{group-user-list.js → group-member-list.js} +17 -17
- package/dist/m365/entra/commands/group/{group-user-set.js → group-member-set.js} +19 -19
- package/dist/m365/entra/commands/m365group/m365group-set.js +159 -81
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +5 -12
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +3 -12
- package/dist/m365/entra/commands.js +3 -3
- package/dist/m365/external/commands/item/item-add.js +2 -5
- package/dist/m365/file/commands/file-move.js +135 -0
- package/dist/m365/file/commands.js +2 -1
- package/dist/m365/flow/commands/environment/environment-list.js +1 -1
- package/dist/m365/pa/commands/app/app-list.js +1 -6
- package/dist/m365/pa/commands/connector/connector-list.js +1 -6
- package/dist/m365/pa/commands/environment/environment-list.js +1 -1
- package/dist/m365/pp/commands/environment/environment-list.js +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.20.0.js +27 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002021_DEVDEP_rushstack_eslint_config.js +10 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.20.0.js +59 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
- package/dist/m365/spo/commands/app/app-instance-list.js +3 -18
- package/dist/m365/spo/commands/app/app-list.js +1 -8
- package/dist/m365/spo/commands/feature/feature-list.js +1 -8
- package/dist/m365/spo/commands/file/file-copy.js +5 -1
- package/dist/m365/spo/commands/file/file-move.js +55 -33
- package/dist/m365/spo/commands/list/list-webhook-list.js +1 -6
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +1 -8
- package/dist/m365/spo/commands/page/page-list.js +1 -1
- package/dist/m365/spo/commands/page/page-remove.js +37 -16
- package/dist/m365/spo/commands/page/page-template-list.js +1 -3
- package/dist/m365/spo/commands/site/site-admin-list.js +8 -9
- package/dist/m365/spo/commands/site/site-admin-remove.js +194 -0
- package/dist/m365/spo/commands/site/site-sharingpermission-set.js +68 -0
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +3 -2
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +1 -3
- package/dist/m365/spo/commands/{site/site-rename.js → tenant/tenant-site-rename.js} +29 -32
- package/dist/m365/spo/commands/theme/theme-list.js +1 -1
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +1 -6
- package/dist/m365/spo/commands.js +3 -1
- package/dist/m365/teams/MeetingTranscript.js +2 -0
- package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +152 -0
- package/dist/m365/teams/commands/tab/tab-list.js +5 -3
- package/dist/m365/teams/commands.js +1 -0
- package/dist/m365/viva/commands/engage/Community.js +2 -0
- package/dist/m365/viva/commands/engage/engage-community-list.js +28 -0
- package/dist/m365/viva/commands.js +1 -0
- package/dist/request.js +46 -61
- package/dist/utils/driveUtil.js +51 -0
- package/dist/utils/spo.js +8 -8
- package/dist/utils/timersUtil.js +12 -0
- package/dist/utils/urlUtil.js +8 -0
- package/docs/docs/cmd/cli/cli-doctor.mdx +24 -23
- package/docs/docs/cmd/entra/group/group-member-add.mdx +62 -0
- package/docs/docs/cmd/entra/group/{group-user-list.mdx → group-member-list.mdx} +14 -14
- package/docs/docs/cmd/entra/group/group-member-set.mdx +62 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activitystorage.mdx +2 -2
- package/docs/docs/cmd/entra/m365group/m365group-set.mdx +37 -16
- package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +0 -3
- package/docs/docs/cmd/external/item/item-add.mdx +3 -3
- package/docs/docs/cmd/file/file-move.mdx +79 -0
- package/docs/docs/cmd/login.mdx +9 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-get.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-add.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-list.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-remove.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.mdx +1 -1
- package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-move.mdx +116 -9
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-get.mdx +1 -1
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-set.mdx +1 -1
- package/docs/docs/cmd/spo/homesite/homesite-remove.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-get.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-remove.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-remove.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-list.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-remove.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-set.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-remove.mdx +30 -12
- package/docs/docs/cmd/spo/site/site-admin-add.mdx +2 -2
- package/docs/docs/cmd/spo/site/site-admin-list.mdx +64 -12
- package/docs/docs/cmd/spo/site/site-admin-remove.mdx +67 -0
- package/docs/docs/cmd/spo/site/site-appcatalog-add.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-commsite-enable.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-list.mdx +6 -4
- package/docs/docs/cmd/spo/site/site-set.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-sharingpermission-set.mdx +58 -0
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +14 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-appcatalog-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-appcatalogurl-get.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-settings-list.mdx +1 -1
- package/docs/docs/cmd/spo/{site/site-rename.mdx → tenant/tenant-site-rename.mdx} +7 -7
- package/docs/docs/cmd/spo/theme/theme-apply.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-get.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-list.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-remove.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-set.mdx +1 -1
- package/docs/docs/cmd/spp/contentcenter/contentcenter-list.mdx +3 -5
- package/docs/docs/cmd/teams/meeting/meeting-transcript-get.mdx +132 -0
- package/docs/docs/cmd/teams/tab/tab-list.mdx +1 -2
- package/docs/docs/cmd/viva/engage/engage-community-list.mdx +81 -0
- package/package.json +1 -1
- package/dist/m365/cli/commands/cli-reconsent.js +0 -29
- package/docs/docs/cmd/cli/cli-reconsent.mdx +0 -62
- package/docs/docs/cmd/entra/group/group-user-add.mdx +0 -62
- package/docs/docs/cmd/entra/group/group-user-set.mdx +0 -62
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { odata } from '../../../../utils/odata.js';
|
|
2
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
|
+
import commands from '../../commands.js';
|
|
4
|
+
class VivaEngageCommunityListCommand extends GraphCommand {
|
|
5
|
+
get name() {
|
|
6
|
+
return commands.ENGAGE_COMMUNITY_LIST;
|
|
7
|
+
}
|
|
8
|
+
get description() {
|
|
9
|
+
return 'Lists all Viva Engage communities';
|
|
10
|
+
}
|
|
11
|
+
defaultProperties() {
|
|
12
|
+
return ['id', 'displayName', 'privacy'];
|
|
13
|
+
}
|
|
14
|
+
async commandAction(logger) {
|
|
15
|
+
if (this.verbose) {
|
|
16
|
+
await logger.logToStderr('Getting all Viva Engage communities...');
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
const results = await odata.getAllItems(`${this.resource}/v1.0/employeeExperience/communities`);
|
|
20
|
+
await logger.log(results);
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
this.handleRejectedODataJsonPromise(err);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export default new VivaEngageCommunityListCommand();
|
|
28
|
+
//# sourceMappingURL=engage-community-list.js.map
|
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
CONNECTIONS_APP_CREATE: `${prefix} connections app create`,
|
|
4
4
|
ENGAGE_COMMUNITY_ADD: `${prefix} engage community add`,
|
|
5
5
|
ENGAGE_COMMUNITY_GET: `${prefix} engage community get`,
|
|
6
|
+
ENGAGE_COMMUNITY_LIST: `${prefix} engage community list`,
|
|
6
7
|
ENGAGE_GROUP_LIST: `${prefix} engage group list`,
|
|
7
8
|
ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
|
|
8
9
|
ENGAGE_GROUP_USER_REMOVE: `${prefix} engage group user remove`,
|
package/dist/request.js
CHANGED
|
@@ -4,6 +4,7 @@ import auth, { Auth } from './Auth.js';
|
|
|
4
4
|
import { app } from './utils/app.js';
|
|
5
5
|
import { formatting } from './utils/formatting.js';
|
|
6
6
|
import { timings } from './cli/timings.js';
|
|
7
|
+
import { timersUtil } from './utils/timersUtil.js';
|
|
7
8
|
class Request {
|
|
8
9
|
set debug(debug) {
|
|
9
10
|
// if the value to set is the same as current value return early to avoid
|
|
@@ -125,76 +126,60 @@ class Request {
|
|
|
125
126
|
options.method = 'HEAD';
|
|
126
127
|
return this.execute(options);
|
|
127
128
|
}
|
|
128
|
-
execute(options
|
|
129
|
+
async execute(options) {
|
|
129
130
|
const start = process.hrtime.bigint();
|
|
130
131
|
if (!this._logger) {
|
|
131
|
-
|
|
132
|
+
throw 'Logger not set on the request object';
|
|
132
133
|
}
|
|
133
134
|
this.updateRequestForCloudType(options, auth.connection.cloudType);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
.
|
|
146
|
-
|
|
147
|
-
if (options.headers['x-anonymous']) {
|
|
148
|
-
delete options.headers['x-anonymous'];
|
|
149
|
-
}
|
|
150
|
-
if (options.headers['x-resource']) {
|
|
151
|
-
delete options.headers['x-resource'];
|
|
152
|
-
}
|
|
153
|
-
if (accessToken !== '') {
|
|
154
|
-
options.headers.authorization = `Bearer ${accessToken}`;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
|
|
158
|
-
if (proxyUrl) {
|
|
159
|
-
options.proxy = this.createProxyConfigFromUrl(proxyUrl);
|
|
135
|
+
try {
|
|
136
|
+
let accessToken = '';
|
|
137
|
+
if (options.headers && options.headers['x-anonymous']) {
|
|
138
|
+
accessToken = '';
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
const url = options.headers && options.headers['x-resource'] ? options.headers['x-resource'] : options.url;
|
|
142
|
+
const resource = Auth.getResourceFromUrl(url);
|
|
143
|
+
accessToken = await auth.ensureAccessToken(resource, this._logger, this._debug);
|
|
144
|
+
}
|
|
145
|
+
if (options.headers) {
|
|
146
|
+
if (options.headers['x-anonymous']) {
|
|
147
|
+
delete options.headers['x-anonymous'];
|
|
160
148
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
.then((res) => {
|
|
164
|
-
if (resolve) {
|
|
165
|
-
resolve((options.responseType === 'stream' || options.fullResponse) ? res : res.data);
|
|
149
|
+
if (options.headers['x-resource']) {
|
|
150
|
+
delete options.headers['x-resource'];
|
|
166
151
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
timings.api.push(Number(end - start));
|
|
170
|
-
_resolve((options.responseType === 'stream' || options.fullResponse) ? res : res.data);
|
|
152
|
+
if (accessToken !== '') {
|
|
153
|
+
options.headers.authorization = `Bearer ${accessToken}`;
|
|
171
154
|
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
155
|
+
}
|
|
156
|
+
const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
|
|
157
|
+
if (proxyUrl) {
|
|
158
|
+
options.proxy = this.createProxyConfigFromUrl(proxyUrl);
|
|
159
|
+
}
|
|
160
|
+
const res = await this.req(options);
|
|
161
|
+
const end = process.hrtime.bigint();
|
|
162
|
+
timings.api.push(Number(end - start));
|
|
163
|
+
return options.responseType === 'stream' || options.fullResponse ?
|
|
164
|
+
res :
|
|
165
|
+
res.data;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
const end = process.hrtime.bigint();
|
|
169
|
+
timings.api.push(Number(end - start));
|
|
170
|
+
if (error && error.response && (error.response.status === 429 || error.response.status === 503)) {
|
|
171
|
+
let retryAfter = parseInt(error.response.headers['retry-after'] || '10');
|
|
172
|
+
if (isNaN(retryAfter)) {
|
|
173
|
+
retryAfter = 10;
|
|
185
174
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
reject(error);
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
const end = process.hrtime.bigint();
|
|
192
|
-
timings.api.push(Number(end - start));
|
|
193
|
-
_reject(error);
|
|
194
|
-
}
|
|
175
|
+
if (this._debug) {
|
|
176
|
+
await this._logger.log(`Request throttled. Waiting ${retryAfter} sec before retrying...`);
|
|
195
177
|
}
|
|
196
|
-
|
|
197
|
-
|
|
178
|
+
await timersUtil.setTimeout(retryAfter * 1000);
|
|
179
|
+
return this.execute(options);
|
|
180
|
+
}
|
|
181
|
+
throw error;
|
|
182
|
+
}
|
|
198
183
|
}
|
|
199
184
|
updateRequestForCloudType(options, cloudType) {
|
|
200
185
|
const url = new URL(options.url);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import request from "../request.js";
|
|
2
|
+
export const driveUtil = {
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the Drive associated with the specified site and URL.
|
|
5
|
+
* @param siteId Site ID
|
|
6
|
+
* @param url Drive URL
|
|
7
|
+
* @returns The Drive associated with the drive URL.
|
|
8
|
+
*/
|
|
9
|
+
async getDriveByUrl(siteId, url) {
|
|
10
|
+
const requestOptions = {
|
|
11
|
+
url: `https://graph.microsoft.com/v1.0/sites/${siteId}/drives?$select=webUrl,id`,
|
|
12
|
+
headers: {
|
|
13
|
+
accept: 'application/json;odata.metadata=none'
|
|
14
|
+
},
|
|
15
|
+
responseType: 'json'
|
|
16
|
+
};
|
|
17
|
+
const drives = await request.get(requestOptions);
|
|
18
|
+
const lowerCaseFolderUrl = url.href.toLowerCase();
|
|
19
|
+
const drive = drives.value
|
|
20
|
+
.sort((a, b) => b.webUrl.localeCompare(a.webUrl))
|
|
21
|
+
.find((d) => {
|
|
22
|
+
const driveUrl = d.webUrl.toLowerCase();
|
|
23
|
+
return lowerCaseFolderUrl.startsWith(driveUrl) &&
|
|
24
|
+
(driveUrl.length === lowerCaseFolderUrl.length ||
|
|
25
|
+
lowerCaseFolderUrl[driveUrl.length] === '/');
|
|
26
|
+
});
|
|
27
|
+
if (!drive) {
|
|
28
|
+
throw `Drive '${url.href}' not found`;
|
|
29
|
+
}
|
|
30
|
+
return drive;
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves the ID of a drive item (file, folder, etc.) associated with the given drive and item URL.
|
|
34
|
+
* @param drive The Drive object containing the item
|
|
35
|
+
* @param itemUrl Item URL
|
|
36
|
+
* @returns Drive item ID
|
|
37
|
+
*/
|
|
38
|
+
async getDriveItemId(drive, itemUrl) {
|
|
39
|
+
const relativeItemUrl = itemUrl.href.replace(new RegExp(`${drive.webUrl}`, 'i'), '').replace(/\/+$/, '');
|
|
40
|
+
const requestOptions = {
|
|
41
|
+
url: `https://graph.microsoft.com/v1.0/drives/${drive.id}/root${relativeItemUrl ? `:${relativeItemUrl}` : ''}?$select=id`,
|
|
42
|
+
headers: {
|
|
43
|
+
accept: 'application/json;odata.metadata=none'
|
|
44
|
+
},
|
|
45
|
+
responseType: 'json'
|
|
46
|
+
};
|
|
47
|
+
const driveItem = await request.get(requestOptions);
|
|
48
|
+
return driveItem?.id;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=driveUtil.js.map
|
package/dist/utils/spo.js
CHANGED
|
@@ -1573,8 +1573,10 @@ export const spo = {
|
|
|
1573
1573
|
AllowSchemaMismatch: true,
|
|
1574
1574
|
BypassSharedLock: !!options?.bypassSharedLock,
|
|
1575
1575
|
IgnoreVersionHistory: !!options?.ignoreVersionHistory,
|
|
1576
|
+
IncludeItemPermissions: !!options?.includeItemPermissions,
|
|
1576
1577
|
CustomizedItemName: options?.newName ? [options.newName] : undefined,
|
|
1577
|
-
SameWebCopyMoveOptimization: true
|
|
1578
|
+
SameWebCopyMoveOptimization: true,
|
|
1579
|
+
IsMoveMode: options?.operation === 'move'
|
|
1578
1580
|
}
|
|
1579
1581
|
}
|
|
1580
1582
|
};
|
|
@@ -1615,7 +1617,7 @@ export const spo = {
|
|
|
1615
1617
|
return objectInfo;
|
|
1616
1618
|
},
|
|
1617
1619
|
/**
|
|
1618
|
-
* Gets the
|
|
1620
|
+
* Gets the primary owner login from a site as admin.
|
|
1619
1621
|
* @param adminUrl The SharePoint admin URL
|
|
1620
1622
|
* @param siteId The site ID
|
|
1621
1623
|
* @param logger The logger object
|
|
@@ -1629,13 +1631,12 @@ export const spo = {
|
|
|
1629
1631
|
const requestOptions = {
|
|
1630
1632
|
url: `${adminUrl}/_api/SPO.Tenant/sites('${siteId}')?$select=OwnerLoginName`,
|
|
1631
1633
|
headers: {
|
|
1632
|
-
accept: 'application/json;odata=nometadata'
|
|
1633
|
-
|
|
1634
|
-
|
|
1634
|
+
accept: 'application/json;odata=nometadata'
|
|
1635
|
+
},
|
|
1636
|
+
responseType: 'json'
|
|
1635
1637
|
};
|
|
1636
1638
|
const response = await request.get(requestOptions);
|
|
1637
|
-
|
|
1638
|
-
return responseContent.OwnerLoginName;
|
|
1639
|
+
return response.OwnerLoginName;
|
|
1639
1640
|
},
|
|
1640
1641
|
/**
|
|
1641
1642
|
* Gets the primary owner login from a site.
|
|
@@ -1650,7 +1651,6 @@ export const spo = {
|
|
|
1650
1651
|
}
|
|
1651
1652
|
const requestOptions = {
|
|
1652
1653
|
url: `${siteUrl}/_api/site/owner`,
|
|
1653
|
-
method: 'GET',
|
|
1654
1654
|
headers: {
|
|
1655
1655
|
'accept': 'application/json;odata=nometadata'
|
|
1656
1656
|
},
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { setTimeout } from "timers/promises";
|
|
2
|
+
export const timersUtil = {
|
|
3
|
+
/**
|
|
4
|
+
* Timeout for a specific duration.
|
|
5
|
+
* @param duration Duration in milliseconds.
|
|
6
|
+
*/
|
|
7
|
+
/* c8 ignore next 3 */
|
|
8
|
+
async setTimeout(duration) {
|
|
9
|
+
return setTimeout(duration);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=timersUtil.js.map
|
package/dist/utils/urlUtil.js
CHANGED
|
@@ -198,6 +198,14 @@ export const urlUtil = {
|
|
|
198
198
|
return rootUrl.origin;
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
|
+
/**
|
|
202
|
+
* Removes leading slashes from the URL.
|
|
203
|
+
* @param url The URL to process.
|
|
204
|
+
* @returns The URL without leading slashes.
|
|
205
|
+
*/
|
|
206
|
+
removeLeadingSlashes(url) {
|
|
207
|
+
return url.replace(/^\/+/, '');
|
|
208
|
+
},
|
|
201
209
|
/**
|
|
202
210
|
* Removes trailing slashes from the URL.
|
|
203
211
|
* @param url The URL to process.
|
|
@@ -22,7 +22,7 @@ This command gets all the necessary diagnostic information needed to triage and
|
|
|
22
22
|
|
|
23
23
|
## Examples
|
|
24
24
|
|
|
25
|
-
Retrieve diagnostic information
|
|
25
|
+
Retrieve diagnostic information.
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
28
|
m365 cli doctor
|
|
@@ -42,18 +42,20 @@ m365 cli doctor
|
|
|
42
42
|
},
|
|
43
43
|
"cliVersion": "6.1.0",
|
|
44
44
|
"nodeVersion": "v16.13.0",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"authMode": "
|
|
45
|
+
"cliEntraAppId": "31359c7f-bd7e-475c-86db-fdb8c937548e",
|
|
46
|
+
"cliEntraAppTenant": "common",
|
|
47
|
+
"authMode": "deviceCode",
|
|
48
48
|
"cliEnvironment": "",
|
|
49
49
|
"cliConfig": {
|
|
50
50
|
"output": "json",
|
|
51
51
|
"showHelpOnFailure": false
|
|
52
52
|
},
|
|
53
53
|
"roles": [],
|
|
54
|
-
"scopes":
|
|
55
|
-
"
|
|
56
|
-
|
|
54
|
+
"scopes": {
|
|
55
|
+
"https://graph.microsoft.com": [
|
|
56
|
+
"AllSites.FullControl"
|
|
57
|
+
]
|
|
58
|
+
}
|
|
57
59
|
}
|
|
58
60
|
```
|
|
59
61
|
|
|
@@ -61,24 +63,24 @@ m365 cli doctor
|
|
|
61
63
|
<TabItem value="Text">
|
|
62
64
|
|
|
63
65
|
```text
|
|
64
|
-
authMode
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
cliEnvironment
|
|
69
|
-
cliVersion
|
|
70
|
-
nodeVersion
|
|
71
|
-
os
|
|
72
|
-
roles
|
|
73
|
-
scopes
|
|
66
|
+
authMode : deviceCode
|
|
67
|
+
cliConfig : {"output":"json","showHelpOnFailure":false}
|
|
68
|
+
cliEntraAppId : 31359c7f-bd7e-475c-86db-fdb8c937548e
|
|
69
|
+
cliEntraAppTenant: common
|
|
70
|
+
cliEnvironment :
|
|
71
|
+
cliVersion : 6.1.0
|
|
72
|
+
nodeVersion : v16.13.0
|
|
73
|
+
os : {"platform":"win32","version":"Windows 10 Pro","release":"10.0.19045"}
|
|
74
|
+
roles : []
|
|
75
|
+
scopes : {"https://graph.microsoft.com":["AllSites.FullControl"]}
|
|
74
76
|
```
|
|
75
77
|
|
|
76
78
|
</TabItem>
|
|
77
79
|
<TabItem value="CSV">
|
|
78
80
|
|
|
79
81
|
```csv
|
|
80
|
-
os,cliVersion,nodeVersion,
|
|
81
|
-
"{""platform"":""win32"",""version"":""Windows 10 Pro"",""release"":""10.0.19045""}",6.1.0,v16.13.0,31359c7f-bd7e-475c-86db-fdb8c937548e,common,
|
|
82
|
+
os,cliVersion,nodeVersion,cliEntraAppId,cliEntraAppTenant,authMode,cliEnvironment,cliConfig,roles,scopes
|
|
83
|
+
"{""platform"":""win32"",""version"":""Windows 10 Pro"",""release"":""10.0.19045""}",6.1.0,v16.13.0,31359c7f-bd7e-475c-86db-fdb8c937548e,common,deviceCode,,"{""output"":""json"",""showHelpOnFailure"":false}",[],"{""https://graph.microsoft.com"":[""AllSites.FullControl""]}"
|
|
82
84
|
```
|
|
83
85
|
|
|
84
86
|
</TabItem>
|
|
@@ -93,12 +95,11 @@ m365 cli doctor
|
|
|
93
95
|
---------|-------
|
|
94
96
|
cliVersion | 6.1.0
|
|
95
97
|
nodeVersion | v16.13.0
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
authMode |
|
|
98
|
+
cliEntraAppId | 31359c7f-bd7e-475c-86db-fdb8c937548e
|
|
99
|
+
cliEntraAppTenant | common
|
|
100
|
+
authMode | deviceCode
|
|
99
101
|
cliEnvironment |
|
|
100
102
|
```
|
|
101
103
|
|
|
102
104
|
</TabItem>
|
|
103
105
|
</Tabs>
|
|
104
|
-
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# entra group member add
|
|
4
|
+
|
|
5
|
+
Adds a member to a Microsoft Entra ID group
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 entra group member add [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-i, --groupId [groupId]`
|
|
17
|
+
: The ID of the Microsoft Entra group. Specify `groupId` or `groupDisplayName` but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --groupDisplayName [groupDisplayName]`
|
|
20
|
+
: The display name of the Microsoft Entra group. Specify `groupId` or `groupDisplayName` but not both.
|
|
21
|
+
|
|
22
|
+
`--ids [ids]`
|
|
23
|
+
: Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids` or `userNames` but not both.
|
|
24
|
+
|
|
25
|
+
`--userNames [userNames]`
|
|
26
|
+
: The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `ids` or `userNames` but not both.
|
|
27
|
+
|
|
28
|
+
`-r, --role <role>`
|
|
29
|
+
: The role to be assigned to the new users. Valid values: `Owner`, `Member`.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<Global />
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
Add a single member specified by ID as a member to a group specified by display name.
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
m365 entra group member add --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Add multiple members specified by ID as members to a group specified by ID.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
m365 entra group member add --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --ids "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Add a single member specified by UPN as an owner to a group specified by display name.
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
m365 entra group member add --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Adds multiple members specified by UPN as owners to a group specified by ID.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
m365 entra group member add --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userNames "john.doe@contoso.com,adele.vance@contoso.com" --role Owner
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Response
|
|
61
|
+
|
|
62
|
+
The command won't return a response on success.
|
|
@@ -2,14 +2,14 @@ import Global from '/docs/cmd/_global.mdx';
|
|
|
2
2
|
import Tabs from '@theme/Tabs';
|
|
3
3
|
import TabItem from '@theme/TabItem';
|
|
4
4
|
|
|
5
|
-
# entra group
|
|
5
|
+
# entra group member list
|
|
6
6
|
|
|
7
|
-
Lists
|
|
7
|
+
Lists members of a specific Entra group
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
m365 entra group
|
|
12
|
+
m365 entra group member list [options]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Alias
|
|
@@ -28,13 +28,13 @@ m365 aad group user list [options]
|
|
|
28
28
|
: The display name of the Entra group. Specify `groupId` or `groupName` but not both.
|
|
29
29
|
|
|
30
30
|
`-r, --role [role]`
|
|
31
|
-
: Filter the results to only
|
|
31
|
+
: Filter the results to only members with the given role: `Owner`, `Member`.
|
|
32
32
|
|
|
33
33
|
`-p, --properties [properties]`
|
|
34
34
|
: Comma-separated list of properties to retrieve.
|
|
35
35
|
|
|
36
36
|
`-f, --filter [filter]`
|
|
37
|
-
: OData filter to use to query the list of
|
|
37
|
+
: OData filter to use to query the list of members with.
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
<Global />
|
|
@@ -45,34 +45,34 @@ When the `properties` option includes values with a `/`, for example: `manager/d
|
|
|
45
45
|
|
|
46
46
|
## Examples
|
|
47
47
|
|
|
48
|
-
List all group
|
|
48
|
+
List all group members from a group specified by ID.
|
|
49
49
|
|
|
50
50
|
```sh
|
|
51
|
-
m365 entra group
|
|
51
|
+
m365 entra group member list --groupId 03cba9da-3974-46c1-afaf-79caa2e45bbe
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
List all owners from a group specified by display name.
|
|
55
55
|
|
|
56
56
|
```sh
|
|
57
|
-
m365 entra group
|
|
57
|
+
m365 entra group member list --groupName Developers --role Owner
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
List all group
|
|
60
|
+
List all group members from a group specified by name. For each one return the display name, e-mail address, and manager display name.
|
|
61
61
|
|
|
62
62
|
```sh
|
|
63
|
-
m365 entra group
|
|
63
|
+
m365 entra group member list --groupName Developers --properties "displayName,mail,manager/displayName"
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
List all group
|
|
66
|
+
List all group members from a group specified by name. For each one return the display name, e-mail address, and manager information.
|
|
67
67
|
|
|
68
68
|
```sh
|
|
69
|
-
m365 entra group
|
|
69
|
+
m365 entra group member list --groupName Developers --properties "displayName,mail,manager/*"
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
List all group members that are guest
|
|
72
|
+
List all group members that are guest members.
|
|
73
73
|
|
|
74
74
|
```sh
|
|
75
|
-
m365 entra group
|
|
75
|
+
m365 entra group member list --groupName Developers --filter "userType eq 'Guest'"
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
## Response
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# entra group member set
|
|
4
|
+
|
|
5
|
+
Updates role of members in a Microsoft Entra ID group
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 entra group member set [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-i, --groupId [groupId]`
|
|
17
|
+
: The ID of the Entra ID group. Specify `groupId` or `groupDisplayName` but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --groupDisplayName [groupDisplayName]`
|
|
20
|
+
: The display name of the Entra ID group. Specify `groupId` or `groupDisplayName` but not both.
|
|
21
|
+
|
|
22
|
+
`--ids [ids]`
|
|
23
|
+
: Comma-separated list of user IDs. Specify either `ids` or `userNames` but not both.
|
|
24
|
+
|
|
25
|
+
`--userNames [userNames]`
|
|
26
|
+
: The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `ids` or `userNames` but not both.
|
|
27
|
+
|
|
28
|
+
`-r, --role <role>`
|
|
29
|
+
: The new role to be assigned to the members. Valid values: `Owner`, `Member`.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<Global />
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
Update a single member specified by ID to a member of a group specified by display name
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
m365 entra group member set --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Update multiple members specified by ID to members of a group specified by ID
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
m365 entra group member set --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --ids "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Update a single member specified by UPN to an owner of a group specified by display name
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
m365 entra group member set --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Update multiple members specified by UPN to owners of a group specified by ID
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
m365 entra group member set --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userNames "john.doe@contoso.com,adele.vance@contoso.com" --role Owner
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Response
|
|
61
|
+
|
|
62
|
+
The command won't return a response on success.
|
|
@@ -9,13 +9,13 @@ Get the total storage used across all group mailboxes and group sites
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
m365 entra m365group report activitystorage
|
|
12
|
+
m365 entra m365group report activitystorage [options]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Alias
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
m365 aad m365group report activitystorage
|
|
18
|
+
m365 aad m365group report activitystorage [options]
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Options
|