@pnp/cli-microsoft365 10.5.0-beta.d99742c → 10.6.0-beta.36bb898
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 +58 -2
- package/dist/m365/booking/commands/business/business-get.js +0 -3
- package/dist/m365/commands/login.js +3 -0
- package/dist/m365/entra/commands/user/user-guest-add.js +0 -3
- package/dist/m365/flow/commands/environment/environment-get.js +0 -3
- package/dist/m365/flow/commands/flow-get.js +0 -3
- package/dist/m365/flow/commands/run/run-get.js +0 -3
- package/dist/m365/pa/commands/app/app-get.js +0 -3
- package/dist/m365/pa/commands/environment/environment-get.js +0 -3
- package/dist/m365/planner/commands/bucket/bucket-add.js +0 -3
- package/dist/m365/planner/commands/plan/plan-add.js +0 -3
- package/dist/m365/planner/commands/plan/plan-get.js +0 -3
- package/dist/m365/planner/commands/plan/plan-set.js +0 -3
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +0 -3
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +0 -3
- package/dist/m365/pp/commands/card/card-get.js +0 -3
- package/dist/m365/pp/commands/copilot/copilot-get.js +0 -3
- package/dist/m365/pp/commands/dataverse/dataverse-table-get.js +0 -3
- package/dist/m365/pp/commands/environment/environment-get.js +0 -3
- package/dist/m365/pp/commands/solution/solution-get.js +0 -3
- package/dist/m365/pp/commands/solution/solution-publisher-get.js +0 -3
- package/dist/m365/pp/commands/website/website-get.js +0 -3
- package/dist/m365/spo/commands/group/group-member-add.js +0 -3
- package/dist/m365/spo/commands/homesite/homesite-add.js +66 -0
- package/dist/m365/spo/commands/page/page-copy.js +0 -3
- package/dist/m365/spo/commands/page/page-get.js +0 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-status-get.js +0 -3
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +0 -3
- package/dist/m365/todo/commands/list/list-get.js +0 -3
- package/dist/m365/todo/commands/task/task-get.js +0 -3
- package/dist/m365/viva/commands/engage/engage-message-add.js +0 -3
- package/dist/m365/viva/commands/engage/engage-message-get.js +0 -3
- package/dist/m365/viva/commands/engage/engage-user-get.js +0 -3
- package/docs/docs/cmd/booking/business/business-get.mdx +13 -0
- package/docs/docs/cmd/entra/user/user-guest-add.mdx +11 -0
- package/docs/docs/cmd/flow/environment/environment-get.mdx +2 -0
- package/docs/docs/cmd/flow/flow-get.mdx +2 -0
- package/docs/docs/cmd/flow/run/run-get.mdx +17 -13
- package/docs/docs/cmd/login.mdx +9 -1
- package/docs/docs/cmd/pa/app/app-get.mdx +8 -2
- package/docs/docs/cmd/pa/environment/environment-get.mdx +5 -3
- package/docs/docs/cmd/planner/plan/plan-add.mdx +2 -0
- package/docs/docs/cmd/planner/plan/plan-get.mdx +8 -4
- package/docs/docs/cmd/planner/plan/plan-set.mdx +2 -0
- package/docs/docs/cmd/planner/task/task-checklistitem-add.mdx +6 -3
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-get.mdx +12 -3
- package/docs/docs/cmd/pp/card/card-get.mdx +36 -5
- package/docs/docs/cmd/pp/copilot/copilot-get.mdx +41 -5
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +19 -4
- package/docs/docs/cmd/pp/environment/environment-get.mdx +5 -2
- package/docs/docs/cmd/pp/solution/solution-get.mdx +12 -7
- package/docs/docs/cmd/pp/solution/solution-publisher-get.mdx +12 -7
- package/docs/docs/cmd/pp/website/website-get.mdx +22 -4
- package/docs/docs/cmd/spo/group/group-member-add.mdx +12 -3
- package/docs/docs/cmd/spo/homesite/homesite-add.mdx +124 -0
- package/docs/docs/cmd/spo/page/page-copy.mdx +30 -4
- package/docs/docs/cmd/spo/page/page-get.mdx +44 -5
- package/docs/docs/cmd/spo/sitedesign/sitedesign-run-status-get.mdx +7 -0
- package/docs/docs/cmd/todo/list/list-get.mdx +7 -4
- package/docs/docs/cmd/todo/task/task-get.mdx +7 -2
- package/docs/docs/cmd/viva/engage/engage-message-add.mdx +37 -12
- package/docs/docs/cmd/viva/engage/engage-message-get.mdx +27 -13
- package/docs/docs/cmd/viva/engage/engage-user-get.mdx +50 -8
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/Auth.js
CHANGED
|
@@ -53,6 +53,7 @@ export var AuthType;
|
|
|
53
53
|
AuthType["Password"] = "password";
|
|
54
54
|
AuthType["Certificate"] = "certificate";
|
|
55
55
|
AuthType["Identity"] = "identity";
|
|
56
|
+
AuthType["FederatedIdentity"] = "federatedIdentity";
|
|
56
57
|
AuthType["Browser"] = "browser";
|
|
57
58
|
AuthType["Secret"] = "secret";
|
|
58
59
|
})(AuthType || (AuthType = {}));
|
|
@@ -153,7 +154,8 @@ export class Auth {
|
|
|
153
154
|
// wasn't specified
|
|
154
155
|
if (this.connection.authType !== AuthType.Certificate &&
|
|
155
156
|
this.connection.authType !== AuthType.Secret &&
|
|
156
|
-
this.connection.authType !== AuthType.Identity
|
|
157
|
+
this.connection.authType !== AuthType.Identity &&
|
|
158
|
+
this.connection.authType !== AuthType.FederatedIdentity) {
|
|
157
159
|
this.clientApplication = await this.getPublicClient(logger, debug);
|
|
158
160
|
if (this.clientApplication) {
|
|
159
161
|
const accounts = await this.clientApplication.getTokenCache().getAllAccounts();
|
|
@@ -177,6 +179,9 @@ export class Auth {
|
|
|
177
179
|
case AuthType.Identity:
|
|
178
180
|
getTokenPromise = this.ensureAccessTokenWithIdentity.bind(this);
|
|
179
181
|
break;
|
|
182
|
+
case AuthType.FederatedIdentity:
|
|
183
|
+
getTokenPromise = this.ensureAccessTokenWithFederatedIdentity.bind(this);
|
|
184
|
+
break;
|
|
180
185
|
case AuthType.Browser:
|
|
181
186
|
getTokenPromise = this.ensureAccessTokenWithBrowser.bind(this);
|
|
182
187
|
break;
|
|
@@ -552,6 +557,56 @@ export class Auth {
|
|
|
552
557
|
}
|
|
553
558
|
}
|
|
554
559
|
}
|
|
560
|
+
async ensureAccessTokenWithFederatedIdentity(resource, logger, debug) {
|
|
561
|
+
if (debug) {
|
|
562
|
+
await logger.logToStderr('Trying to retrieve access token using federated identity...');
|
|
563
|
+
}
|
|
564
|
+
if (!process.env.ACTIONS_ID_TOKEN_REQUEST_URL || !process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN) {
|
|
565
|
+
throw new CommandError('Federated identity is currently only supported in GitHub Actions.');
|
|
566
|
+
}
|
|
567
|
+
if (debug) {
|
|
568
|
+
await logger.logToStderr('ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN env variables found. The context is GitHub Actions...');
|
|
569
|
+
}
|
|
570
|
+
const federationToken = await this.getFederationTokenFromGithub(logger, debug);
|
|
571
|
+
const queryParams = [
|
|
572
|
+
'grant_type=client_credentials',
|
|
573
|
+
`scope=${encodeURIComponent(`${resource}/.default`)}`,
|
|
574
|
+
`client_id=${this.connection.appId}`,
|
|
575
|
+
`client_assertion_type=${encodeURIComponent('urn:ietf:params:oauth:client-assertion-type:jwt-bearer')}`,
|
|
576
|
+
`client_assertion=${federationToken}`
|
|
577
|
+
];
|
|
578
|
+
const requestOptions = {
|
|
579
|
+
url: `https://login.microsoftonline.com/${this.connection.tenant}/oauth2/v2.0/token`,
|
|
580
|
+
headers: {
|
|
581
|
+
accept: 'application/json',
|
|
582
|
+
'x-anonymous': true,
|
|
583
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
584
|
+
},
|
|
585
|
+
data: queryParams.join('&'),
|
|
586
|
+
responseType: 'json'
|
|
587
|
+
};
|
|
588
|
+
const accessTokenResponse = await request.post(requestOptions);
|
|
589
|
+
return {
|
|
590
|
+
accessToken: accessTokenResponse.access_token,
|
|
591
|
+
expiresOn: new Date(parseInt(accessTokenResponse.expires_on) * 1000)
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
async getFederationTokenFromGithub(logger, debug) {
|
|
595
|
+
if (debug) {
|
|
596
|
+
await logger.logToStderr('Retrieving GitHub federation token...');
|
|
597
|
+
}
|
|
598
|
+
const requestOptions = {
|
|
599
|
+
url: `${process.env.ACTIONS_ID_TOKEN_REQUEST_URL}&audience=${encodeURIComponent('api://AzureADTokenExchange')}`,
|
|
600
|
+
headers: {
|
|
601
|
+
Authorization: `Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`,
|
|
602
|
+
accept: 'application/json',
|
|
603
|
+
'x-anonymous': true
|
|
604
|
+
},
|
|
605
|
+
responseType: 'json'
|
|
606
|
+
};
|
|
607
|
+
const accessTokenResponse = await request.get(requestOptions);
|
|
608
|
+
return accessTokenResponse.value;
|
|
609
|
+
}
|
|
555
610
|
async ensureAccessTokenWithSecret(resource, logger, debug, fetchNew) {
|
|
556
611
|
this.clientApplication = await this.getConfidentialClient(logger, debug, undefined, undefined, this.connection.secret);
|
|
557
612
|
return this.clientApplication.acquireTokenByClientCredential({
|
|
@@ -626,7 +681,8 @@ export class Auth {
|
|
|
626
681
|
// When using an application identity, there is no account in the MSAL TokenCache
|
|
627
682
|
if (this.connection.authType !== AuthType.Certificate &&
|
|
628
683
|
this.connection.authType !== AuthType.Secret &&
|
|
629
|
-
this.connection.authType !== AuthType.Identity
|
|
684
|
+
this.connection.authType !== AuthType.Identity &&
|
|
685
|
+
this.connection.authType !== AuthType.FederatedIdentity) {
|
|
630
686
|
this.clientApplication = await this.getPublicClient(logger, debug);
|
|
631
687
|
if (this.clientApplication) {
|
|
632
688
|
const tokenCache = this.clientApplication.getTokenCache();
|
|
@@ -16,9 +16,6 @@ class BookingBusinessGetCommand extends GraphCommand {
|
|
|
16
16
|
get description() {
|
|
17
17
|
return 'Retrieve the specified Microsoft Bookings business.';
|
|
18
18
|
}
|
|
19
|
-
defaultProperties() {
|
|
20
|
-
return ['id', 'displayName', 'businessType', 'phone', 'email', 'defaultCurrencyIso'];
|
|
21
|
-
}
|
|
22
19
|
constructor() {
|
|
23
20
|
super();
|
|
24
21
|
_BookingBusinessGetCommand_instances.add(this);
|
|
@@ -184,6 +184,9 @@ class LoginCommand extends Command {
|
|
|
184
184
|
auth.connection.authType = AuthType.Identity;
|
|
185
185
|
auth.connection.userName = args.options.userName;
|
|
186
186
|
break;
|
|
187
|
+
case 'federatedIdentity':
|
|
188
|
+
auth.connection.authType = AuthType.FederatedIdentity;
|
|
189
|
+
break;
|
|
187
190
|
case 'browser':
|
|
188
191
|
auth.connection.authType = AuthType.Browser;
|
|
189
192
|
break;
|
|
@@ -20,9 +20,6 @@ class EntraUserGuestAddCommand extends GraphCommand {
|
|
|
20
20
|
__classPrivateFieldGet(this, _EntraUserGuestAddCommand_instances, "m", _EntraUserGuestAddCommand_initTelemetry).call(this);
|
|
21
21
|
__classPrivateFieldGet(this, _EntraUserGuestAddCommand_instances, "m", _EntraUserGuestAddCommand_initOptions).call(this);
|
|
22
22
|
}
|
|
23
|
-
defaultProperties() {
|
|
24
|
-
return ['id', 'inviteRedeemUrl', 'invitedUserDisplayName', 'invitedUserEmailAddress', 'invitedUserType', 'resetRedemption', 'sendInvitationMessage', 'status'];
|
|
25
|
-
}
|
|
26
23
|
async commandAction(logger, args) {
|
|
27
24
|
try {
|
|
28
25
|
const requestOptions = {
|
|
@@ -15,9 +15,6 @@ class FlowEnvironmentGetCommand extends PowerAutomateCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Gets information about the specified Microsoft Flow environment';
|
|
17
17
|
}
|
|
18
|
-
defaultProperties() {
|
|
19
|
-
return ['name', 'id', 'location', 'displayName', 'provisioningState', 'environmentSku', 'azureRegionHint', 'isDefault'];
|
|
20
|
-
}
|
|
21
18
|
constructor() {
|
|
22
19
|
super();
|
|
23
20
|
_FlowEnvironmentGetCommand_instances.add(this);
|
|
@@ -15,9 +15,6 @@ class FlowGetCommand extends PowerAutomateCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Gets information about the specified Microsoft Flow';
|
|
17
17
|
}
|
|
18
|
-
defaultProperties() {
|
|
19
|
-
return ['name', 'displayName', 'description', 'triggers', 'actions'];
|
|
20
|
-
}
|
|
21
18
|
constructor() {
|
|
22
19
|
super();
|
|
23
20
|
_FlowGetCommand_instances.add(this);
|
|
@@ -16,9 +16,6 @@ class FlowRunGetCommand extends PowerAutomateCommand {
|
|
|
16
16
|
get description() {
|
|
17
17
|
return 'Gets information about a specific run of the specified Microsoft Flow';
|
|
18
18
|
}
|
|
19
|
-
defaultProperties() {
|
|
20
|
-
return ['name', 'startTime', 'endTime', 'status', 'triggerName'];
|
|
21
|
-
}
|
|
22
19
|
constructor() {
|
|
23
20
|
super();
|
|
24
21
|
_FlowRunGetCommand_instances.add(this);
|
|
@@ -18,9 +18,6 @@ class PaAppGetCommand extends PowerAppsCommand {
|
|
|
18
18
|
get description() {
|
|
19
19
|
return 'Gets information about the specified Microsoft Power App';
|
|
20
20
|
}
|
|
21
|
-
defaultProperties() {
|
|
22
|
-
return ['name', 'displayName', 'description', 'appVersion', 'owner'];
|
|
23
|
-
}
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|
|
26
23
|
_PaAppGetCommand_instances.add(this);
|
|
@@ -15,9 +15,6 @@ class PaEnvironmentGetCommand extends PowerAppsCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Gets information about the specified Microsoft Power Apps environment';
|
|
17
17
|
}
|
|
18
|
-
defaultProperties() {
|
|
19
|
-
return ['name', 'id', 'location', 'displayName', 'provisioningState', 'environmentSku', 'azureRegionHint', 'isDefault'];
|
|
20
|
-
}
|
|
21
18
|
constructor() {
|
|
22
19
|
super();
|
|
23
20
|
_PaEnvironmentGetCommand_instances.add(this);
|
|
@@ -17,9 +17,6 @@ class PlannerBucketAddCommand extends GraphCommand {
|
|
|
17
17
|
get description() {
|
|
18
18
|
return 'Adds a new Microsoft Planner bucket';
|
|
19
19
|
}
|
|
20
|
-
defaultProperties() {
|
|
21
|
-
return ['id', 'name', 'planId', 'orderHint'];
|
|
22
|
-
}
|
|
23
20
|
constructor() {
|
|
24
21
|
super();
|
|
25
22
|
_PlannerBucketAddCommand_instances.add(this);
|
|
@@ -18,9 +18,6 @@ class PlannerPlanAddCommand extends GraphCommand {
|
|
|
18
18
|
get description() {
|
|
19
19
|
return 'Adds a new Microsoft Planner plan';
|
|
20
20
|
}
|
|
21
|
-
defaultProperties() {
|
|
22
|
-
return ['id', 'title', 'createdDateTime', 'owner'];
|
|
23
|
-
}
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|
|
26
23
|
_PlannerPlanAddCommand_instances.add(this);
|
|
@@ -17,9 +17,6 @@ class PlannerPlanGetCommand extends GraphCommand {
|
|
|
17
17
|
get description() {
|
|
18
18
|
return 'Get a Microsoft Planner plan';
|
|
19
19
|
}
|
|
20
|
-
defaultProperties() {
|
|
21
|
-
return ['id', 'title', 'createdDateTime', 'owner', '@odata.etag'];
|
|
22
|
-
}
|
|
23
20
|
constructor() {
|
|
24
21
|
super();
|
|
25
22
|
_PlannerPlanGetCommand_instances.add(this);
|
|
@@ -18,9 +18,6 @@ class PlannerPlanSetCommand extends GraphCommand {
|
|
|
18
18
|
get description() {
|
|
19
19
|
return 'Updates a Microsoft Planner plan';
|
|
20
20
|
}
|
|
21
|
-
defaultProperties() {
|
|
22
|
-
return ['id', 'title', 'createdDateTime', 'owner'];
|
|
23
|
-
}
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|
|
26
23
|
_PlannerPlanSetCommand_instances.add(this);
|
|
@@ -17,9 +17,6 @@ class PlannerTaskChecklistItemAddCommand extends GraphCommand {
|
|
|
17
17
|
get description() {
|
|
18
18
|
return 'Adds a new checklist item to a Planner task.';
|
|
19
19
|
}
|
|
20
|
-
defaultProperties() {
|
|
21
|
-
return ['id', 'title', 'isChecked'];
|
|
22
|
-
}
|
|
23
20
|
constructor() {
|
|
24
21
|
super();
|
|
25
22
|
_PlannerTaskChecklistItemAddCommand_instances.add(this);
|
|
@@ -18,9 +18,6 @@ class PpAiBuilderModelGetCommand extends PowerPlatformCommand {
|
|
|
18
18
|
get description() {
|
|
19
19
|
return 'Get an AI builder model in the specified Power Platform environment.';
|
|
20
20
|
}
|
|
21
|
-
defaultProperties() {
|
|
22
|
-
return ['msdyn_name', 'msdyn_aimodelid', 'createdon', 'modifiedon'];
|
|
23
|
-
}
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|
|
26
23
|
_PpAiBuilderModelGetCommand_instances.add(this);
|
|
@@ -18,9 +18,6 @@ class PpCardGetCommand extends PowerPlatformCommand {
|
|
|
18
18
|
get description() {
|
|
19
19
|
return 'Get specific Microsoft Power Platform card in the specified Power Platform environment.';
|
|
20
20
|
}
|
|
21
|
-
defaultProperties() {
|
|
22
|
-
return ['name', 'cardid', 'publishdate', 'createdon', 'modifiedon'];
|
|
23
|
-
}
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|
|
26
23
|
_PpCardGetCommand_instances.add(this);
|
|
@@ -21,9 +21,6 @@ class PpCopilotGetCommand extends PowerPlatformCommand {
|
|
|
21
21
|
alias() {
|
|
22
22
|
return [commands.CHATBOT_GET];
|
|
23
23
|
}
|
|
24
|
-
defaultProperties() {
|
|
25
|
-
return ['name', 'botid', 'publishedon', 'createdon', 'modifiedon'];
|
|
26
|
-
}
|
|
27
24
|
constructor() {
|
|
28
25
|
super();
|
|
29
26
|
_PpCopilotGetCommand_instances.add(this);
|
|
@@ -15,9 +15,6 @@ class PpDataverseTableGetCommand extends PowerPlatformCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Gets a dataverse table in a given environment';
|
|
17
17
|
}
|
|
18
|
-
defaultProperties() {
|
|
19
|
-
return ['SchemaName', 'EntitySetName', 'LogicalName', 'IsManaged'];
|
|
20
|
-
}
|
|
21
18
|
constructor() {
|
|
22
19
|
super();
|
|
23
20
|
_PpDataverseTableGetCommand_instances.add(this);
|
|
@@ -15,9 +15,6 @@ class PpEnvironmentGetCommand extends PowerPlatformCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Gets information about the specified Power Platform environment';
|
|
17
17
|
}
|
|
18
|
-
defaultProperties() {
|
|
19
|
-
return ['name', 'id'];
|
|
20
|
-
}
|
|
21
18
|
constructor() {
|
|
22
19
|
super();
|
|
23
20
|
_PpEnvironmentGetCommand_instances.add(this);
|
|
@@ -17,9 +17,6 @@ class PpSolutionGetCommand extends PowerPlatformCommand {
|
|
|
17
17
|
get description() {
|
|
18
18
|
return 'Gets a specific solution in a given environment.';
|
|
19
19
|
}
|
|
20
|
-
defaultProperties() {
|
|
21
|
-
return ['uniquename', 'version', 'publisher'];
|
|
22
|
-
}
|
|
23
20
|
constructor() {
|
|
24
21
|
super();
|
|
25
22
|
_PpSolutionGetCommand_instances.add(this);
|
|
@@ -16,9 +16,6 @@ class PpSolutionPublisherGetCommand extends PowerPlatformCommand {
|
|
|
16
16
|
get description() {
|
|
17
17
|
return 'Get information about the specified publisher in a given environment.';
|
|
18
18
|
}
|
|
19
|
-
defaultProperties() {
|
|
20
|
-
return ['publisherid', 'uniquename', 'friendlyname'];
|
|
21
|
-
}
|
|
22
19
|
constructor() {
|
|
23
20
|
super();
|
|
24
21
|
_PpSolutionPublisherGetCommand_instances.add(this);
|
|
@@ -22,9 +22,6 @@ class PpWebSiteGetCommand extends PowerPlatformCommand {
|
|
|
22
22
|
get description() {
|
|
23
23
|
return 'Gets information about the specified Power Pages website.';
|
|
24
24
|
}
|
|
25
|
-
defaultProperties() {
|
|
26
|
-
return ['id', 'name', 'websiteUrl', 'tenantId', 'subdomain', 'type', 'status', 'siteVisibility'];
|
|
27
|
-
}
|
|
28
25
|
get schema() {
|
|
29
26
|
return options;
|
|
30
27
|
}
|
|
@@ -17,9 +17,6 @@ class SpoGroupMemberAddCommand extends SpoCommand {
|
|
|
17
17
|
get description() {
|
|
18
18
|
return 'Add members to a SharePoint Group';
|
|
19
19
|
}
|
|
20
|
-
defaultProperties() {
|
|
21
|
-
return ['Title', 'UserPrincipalName'];
|
|
22
|
-
}
|
|
23
20
|
constructor() {
|
|
24
21
|
super();
|
|
25
22
|
_SpoGroupMemberAddCommand_instances.add(this);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { zod } from '../../../../utils/zod.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
4
|
+
import { spo } from '../../../../utils/spo.js';
|
|
5
|
+
import { validation } from '../../../../utils/validation.js';
|
|
6
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
7
|
+
import commands from '../../commands.js';
|
|
8
|
+
import request from '../../../../request.js';
|
|
9
|
+
const options = globalOptionsZod
|
|
10
|
+
.extend({
|
|
11
|
+
url: zod.alias('u', z.string()
|
|
12
|
+
.refine((url) => validation.isValidSharePointUrl(url) === true, url => ({
|
|
13
|
+
message: `'${url}' is not a valid SharePoint Online site URL.`
|
|
14
|
+
}))),
|
|
15
|
+
audiences: z.string()
|
|
16
|
+
.refine(audiences => validation.isValidGuidArray(audiences) === true, audiences => ({
|
|
17
|
+
message: `The following GUIDs are invalid: ${validation.isValidGuidArray(audiences)}.`
|
|
18
|
+
})).optional(),
|
|
19
|
+
vivaConnectionsDefaultStart: z.boolean().optional(),
|
|
20
|
+
isInDraftMode: z.boolean().optional(),
|
|
21
|
+
order: z.number()
|
|
22
|
+
.refine(order => validation.isValidPositiveInteger(order) === true, order => ({
|
|
23
|
+
message: `'${order}' is not a positive integer.`
|
|
24
|
+
})).optional()
|
|
25
|
+
})
|
|
26
|
+
.strict();
|
|
27
|
+
class SpoHomeSiteAddCommand extends SpoCommand {
|
|
28
|
+
get name() {
|
|
29
|
+
return commands.HOMESITE_ADD;
|
|
30
|
+
}
|
|
31
|
+
get description() {
|
|
32
|
+
return 'Adds a home site';
|
|
33
|
+
}
|
|
34
|
+
get schema() {
|
|
35
|
+
return options;
|
|
36
|
+
}
|
|
37
|
+
async commandAction(logger, args) {
|
|
38
|
+
try {
|
|
39
|
+
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.verbose);
|
|
40
|
+
const requestOptions = {
|
|
41
|
+
url: `${spoAdminUrl}/_api/SPHSite/AddHomeSite`,
|
|
42
|
+
headers: {
|
|
43
|
+
accept: 'application/json;odata=nometadata'
|
|
44
|
+
},
|
|
45
|
+
responseType: 'json',
|
|
46
|
+
data: {
|
|
47
|
+
siteUrl: args.options.url,
|
|
48
|
+
audiences: args.options.audiences?.split(','),
|
|
49
|
+
vivaConnectionsDefaultStart: args.options.vivaConnectionsDefaultStart ?? true,
|
|
50
|
+
isInDraftMode: args.options.isInDraftMode ?? false,
|
|
51
|
+
order: args.options.order
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
if (this.verbose) {
|
|
55
|
+
await logger.logToStderr(`Adding home site with URL: ${args.options.url}...`);
|
|
56
|
+
}
|
|
57
|
+
const res = await request.post(requestOptions);
|
|
58
|
+
await logger.log(res);
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
this.handleRejectedODataJsonPromise(err);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export default new SpoHomeSiteAddCommand();
|
|
66
|
+
//# sourceMappingURL=homesite-add.js.map
|
|
@@ -16,9 +16,6 @@ class SpoPageCopyCommand extends SpoCommand {
|
|
|
16
16
|
get description() {
|
|
17
17
|
return 'Creates a copy of a modern page or template';
|
|
18
18
|
}
|
|
19
|
-
defaultProperties() {
|
|
20
|
-
return ['Id', 'PageLayoutType', 'Title', 'Url'];
|
|
21
|
-
}
|
|
22
19
|
constructor() {
|
|
23
20
|
super();
|
|
24
21
|
_SpoPageCopyCommand_instances.add(this);
|
|
@@ -25,9 +25,6 @@ class SpoPageGetCommand extends SpoCommand {
|
|
|
25
25
|
get description() {
|
|
26
26
|
return 'Gets information about the specific modern page';
|
|
27
27
|
}
|
|
28
|
-
defaultProperties() {
|
|
29
|
-
return ['commentsDisabled', 'numSections', 'numControls', 'title', 'layoutType'];
|
|
30
|
-
}
|
|
31
28
|
get schema() {
|
|
32
29
|
return options;
|
|
33
30
|
}
|
|
@@ -15,9 +15,6 @@ class SpoSiteDesignRunStatusGetCommand extends SpoCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Gets information about the site scripts executed for the specified site design';
|
|
17
17
|
}
|
|
18
|
-
defaultProperties() {
|
|
19
|
-
return ['ActionTitle', 'SiteScriptTitle', 'OutcomeText'];
|
|
20
|
-
}
|
|
21
18
|
constructor() {
|
|
22
19
|
super();
|
|
23
20
|
_SpoSiteDesignRunStatusGetCommand_instances.add(this);
|
|
@@ -116,6 +116,7 @@ export default {
|
|
|
116
116
|
GROUP_MEMBER_REMOVE: `${prefix} group member remove`,
|
|
117
117
|
HIDEDEFAULTTHEMES_GET: `${prefix} hidedefaultthemes get`,
|
|
118
118
|
HIDEDEFAULTTHEMES_SET: `${prefix} hidedefaultthemes set`,
|
|
119
|
+
HOMESITE_ADD: `${prefix} homesite add`,
|
|
119
120
|
HOMESITE_GET: `${prefix} homesite get`,
|
|
120
121
|
HOMESITE_LIST: `${prefix} homesite list`,
|
|
121
122
|
HOMESITE_REMOVE: `${prefix} homesite remove`,
|
|
@@ -14,9 +14,6 @@ class TenantServiceAnnouncementHealthGetCommand extends GraphCommand {
|
|
|
14
14
|
get description() {
|
|
15
15
|
return 'This operation provides the health information of a specified service for a tenant';
|
|
16
16
|
}
|
|
17
|
-
defaultProperties() {
|
|
18
|
-
return ['id', 'status', 'service'];
|
|
19
|
-
}
|
|
20
17
|
constructor() {
|
|
21
18
|
super();
|
|
22
19
|
_TenantServiceAnnouncementHealthGetCommand_instances.add(this);
|
|
@@ -15,9 +15,6 @@ class TodoListGetCommand extends DelegatedGraphCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Gets a specific list of Microsoft To Do task lists';
|
|
17
17
|
}
|
|
18
|
-
defaultProperties() {
|
|
19
|
-
return ['displayName', 'id'];
|
|
20
|
-
}
|
|
21
18
|
constructor() {
|
|
22
19
|
super();
|
|
23
20
|
_TodoListGetCommand_instances.add(this);
|
|
@@ -16,9 +16,6 @@ class TodoTaskGetCommand extends DelegatedGraphCommand {
|
|
|
16
16
|
get description() {
|
|
17
17
|
return 'Get a specific task from a Microsoft To Do task list';
|
|
18
18
|
}
|
|
19
|
-
defaultProperties() {
|
|
20
|
-
return ['id', 'title', 'status', 'createdDateTime', 'lastModifiedDateTime'];
|
|
21
|
-
}
|
|
22
19
|
constructor() {
|
|
23
20
|
super();
|
|
24
21
|
_TodoTaskGetCommand_instances.add(this);
|
|
@@ -14,9 +14,6 @@ class VivaEngageMessageAddCommand extends VivaEngageCommand {
|
|
|
14
14
|
get description() {
|
|
15
15
|
return 'Posts a Viva Engage network message on behalf of the current user';
|
|
16
16
|
}
|
|
17
|
-
defaultProperties() {
|
|
18
|
-
return ['id'];
|
|
19
|
-
}
|
|
20
17
|
constructor() {
|
|
21
18
|
super();
|
|
22
19
|
_VivaEngageMessageAddCommand_instances.add(this);
|
|
@@ -14,9 +14,6 @@ class VivaEngageMessageGetCommand extends VivaEngageCommand {
|
|
|
14
14
|
get description() {
|
|
15
15
|
return 'Returns a Viva Engage message';
|
|
16
16
|
}
|
|
17
|
-
defaultProperties() {
|
|
18
|
-
return ['id', 'sender_id', 'replied_to_id', 'thread_id', 'group_id', 'created_at', 'direct_message', 'system_message', 'privacy', 'message_type', 'content_excerpt'];
|
|
19
|
-
}
|
|
20
17
|
constructor() {
|
|
21
18
|
super();
|
|
22
19
|
_VivaEngageMessageGetCommand_instances.add(this);
|
|
@@ -15,9 +15,6 @@ class VivaEngageUserGetCommand extends VivaEngageCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Retrieves the current user or searches for a user by ID or e-mail';
|
|
17
17
|
}
|
|
18
|
-
defaultProperties() {
|
|
19
|
-
return ['id', 'full_name', 'email', 'job_title', 'state', 'url'];
|
|
20
|
-
}
|
|
21
18
|
constructor() {
|
|
22
19
|
super();
|
|
23
20
|
_VivaEngageUserGetCommand_instances.add(this);
|
|
@@ -137,6 +137,19 @@ m365 booking business get --name 'business name'
|
|
|
137
137
|
email : runningdevadmin@contoso.onmicrosoft.com
|
|
138
138
|
id : Accounting@contoso.onmicrosoft.com
|
|
139
139
|
phone :
|
|
140
|
+
address : {city:"",countryOrRegion:"",postalCode:"",state:"",street:""}
|
|
141
|
+
businessHours : [{day:"monday",timeSlots:[{endTime:"17:00:00.0000000",startTime:"08:00:00.0000000"}]},{day:"tuesday",timeSlots:[{endTime:"17:00:00.0000000",startTime:"08:00:00.0000000"}]},{day:"wednesday",timeSlots:[{endTime:"17:00:00.0000000",startTime:"08:00:00.0000000"}]},{day:"thursday",timeSlots:[{endTime:"17:00:00.0000000",startTime:"08:00:00.0000000"}]},{day:"friday",timeSlots:[{endTime:"17:00:00.0000000",startTime:"08:00:00.0000000"}]},{day:"saturday",timeSlots:[]},{day:"sunday",timeSlots:[]}]
|
|
142
|
+
businessType : "Financial services"
|
|
143
|
+
defaultCurrencyIso: "USD"
|
|
144
|
+
displayName : "Accounting"
|
|
145
|
+
email : "runningdevadmin@contoso.onmicrosoft.com"
|
|
146
|
+
id : "Accounting@contoso.onmicrosoft.com"
|
|
147
|
+
isPublished : true
|
|
148
|
+
languageTag : ""
|
|
149
|
+
phone : ""
|
|
150
|
+
publicUrl : "https://outlook.office365.com/owa/calendar/Accounting@contoso.onmicrosoft.com/bookings/"
|
|
151
|
+
schedulingPolicy : {allowStaffSelection:true,maximumAdvance:"P365D",minimumLeadTime:"P1D",sendConfirmationsToOwner:true,timeSlotInterval:"PT30M"}
|
|
152
|
+
webSiteUrl : ""
|
|
140
153
|
```
|
|
141
154
|
|
|
142
155
|
</TabItem>
|
|
@@ -105,6 +105,17 @@ m365 entra user guest add --emailAddress john.doe@contoso.com --messageLanguage
|
|
|
105
105
|
resetRedemption : false
|
|
106
106
|
sendInvitationMessage : true
|
|
107
107
|
status : PendingAcceptance
|
|
108
|
+
id : "35f7f726-c541-4aef-a64e-a7b6868fe47f"
|
|
109
|
+
inviteRedeemUrl : "https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3db373bc30-03b3-49bc-be72-9dd3e9027da8%26user%3d35f7f726-c541-4aef-a64e-a7b6868fe47f%26ticket%3dCjO3u3ZpQF2uthfZETfZ8gURzod5egvYI0uhaSN1Loo%25253d%26ver%3d2.0"
|
|
110
|
+
inviteRedirectUrl : "https://myapplications.microsoft.com/"
|
|
111
|
+
invitedUser : {id:"5257b5b2-4056-4a45-a05e-df5c92d53e6e"}
|
|
112
|
+
invitedUserDisplayName : "John Doe"
|
|
113
|
+
invitedUserEmailAddress: "john.doe@contoso.com"
|
|
114
|
+
invitedUserMessageInfo : {ccRecipients:[{emailAddress:{address:"maria.jones@contoso.com",name:null}}],customizedMessageBody:"Hi John, welcome to the organization!",messageLanguage:"en-US"}
|
|
115
|
+
invitedUserType : "Guest"
|
|
116
|
+
resetRedemption : false
|
|
117
|
+
sendInvitationMessage : true
|
|
118
|
+
status : "PendingAcceptance"
|
|
108
119
|
```
|
|
109
120
|
|
|
110
121
|
</TabItem>
|
|
@@ -137,6 +137,8 @@ m365 flow environment get
|
|
|
137
137
|
location : india
|
|
138
138
|
name : Default-d87a7535-dd31-4437-bfe1-95340acd55c5
|
|
139
139
|
provisioningState: Succeeded
|
|
140
|
+
properties : {azureRegionHint:"centralindia",cluster:{category:"Prod",environment:"Prod",geoShortName:"IN",number:"101",uriSuffix:"in-il101.gateway.prod.island"},createdBy:{displayName:"SYSTEM",id:"SYSTEM",type:"NotSpecified"},createdTime:"2019-12-21T18:32:11.8708704Z",creationType:"DefaultTenant",displayName:"contoso (default)",environmentFeatures:{isOpenApiEnabled:false},environmentSku:"Default",environmentType:"NotSpecified",governanceConfiguration:{protectionLevel:"Basic"},isDefault:true,isPayAsYouGoEnabled:false,linkedEnvironmentMetadata:{baseLanguage:1033,createdTime:"2019-12-25T15:46:14.433Z",domainName:"orgfc80770f",friendlyName:"contoso (default)",instanceApiUrl:"https://orgfc80770f.api.crm8.dynamics.com",instanceState:"Ready",instanceUrl:"https://orgfc80770f.crm8.dynamics.com/",resourceId:"3aa550bf-52ac-42fc-98f7-5d1833c1501c",type:"NotSpecified",uniqueName:"orgfc80770f",version:"9.2.22105.00154"},provisioningState:"Succeeded",runtimeEndpoints:{microsoft.ApiManagement:"https://management.INDIA.azure-apihub.net",microsoft.BusinessAppPlatform:"https://india.api.bap.microsoft.com",microsoft.CommonDataModel:"https://india.api.cds.microsoft.com",microsoft.Flow:"https://india.api.flow.microsoft.com",microsoft.PowerApps:"https://india.api.powerapps.com",microsoft.PowerAppsAdvisor:"https://india.api.advisor.powerapps.com",microsoft.PowerVirtualAgents:"https://powervamg.in-il101.gateway.prod.island.powerapps.com"},states:{management:{id:"NotSpecified"},runtime:{id:"Enabled",requestedBy:{displayName:"SYSTEM",type:"NotSpecified"},runtimeReasonCode:"NotSpecified"}}}
|
|
141
|
+
type : "Microsoft.ProcessSimple/environments"
|
|
140
142
|
```
|
|
141
143
|
|
|
142
144
|
</TabItem>
|
|
@@ -284,8 +284,10 @@ m365 flow get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --n
|
|
|
284
284
|
actions : OpenApiConnection-AnalyzeImageV2, Compose, InitializeVariable, OpenApiConnection-HttpRequest, ParseJson, OpenApiConnection-PatchFileItem
|
|
285
285
|
description:
|
|
286
286
|
displayName: My Flow
|
|
287
|
+
id : /providers/Microsoft.ProcessSimple/environments/Default-1e852b49-bf4b-4ba5-bcd4-a8c4706c8ed4/flows/ca76d7b8-3b76-4050-8c03-9fb310ad172f
|
|
287
288
|
name : ca76d7b8-3b76-4050-8c03-9fb310ad172f
|
|
288
289
|
triggers : OpenApiConnection
|
|
290
|
+
type : Microsoft.ProcessSimple/environments/flows
|
|
289
291
|
```
|
|
290
292
|
|
|
291
293
|
</TabItem>
|