@pnp/cli-microsoft365 5.9.0-beta.005c47a → 5.9.0-beta.1672f8f

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 CHANGED
@@ -17,6 +17,7 @@ const dictionary = [
17
17
  'content',
18
18
  'conversation',
19
19
  'custom',
20
+ 'dataverse',
20
21
  'default',
21
22
  'external',
22
23
  'externalize',
@@ -61,6 +62,7 @@ const dictionary = [
61
62
  'site',
62
63
  'status',
63
64
  'storage',
65
+ 'table',
64
66
  'teams',
65
67
  'token',
66
68
  'type',
@@ -0,0 +1,75 @@
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 _PpDataverseTableListCommand_instances, _PpDataverseTableListCommand_initTelemetry, _PpDataverseTableListCommand_initOptions;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const request_1 = require("../../../../request");
19
+ const powerPlatform_1 = require("../../../../utils/powerPlatform");
20
+ const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
21
+ const commands_1 = require("../../commands");
22
+ class PpDataverseTableListCommand extends PowerPlatformCommand_1.default {
23
+ constructor() {
24
+ super();
25
+ _PpDataverseTableListCommand_instances.add(this);
26
+ __classPrivateFieldGet(this, _PpDataverseTableListCommand_instances, "m", _PpDataverseTableListCommand_initTelemetry).call(this);
27
+ __classPrivateFieldGet(this, _PpDataverseTableListCommand_instances, "m", _PpDataverseTableListCommand_initOptions).call(this);
28
+ }
29
+ get name() {
30
+ return commands_1.default.DATAVERSE_TABLE_LIST;
31
+ }
32
+ get description() {
33
+ return 'Lists dataverse tables in a given environment';
34
+ }
35
+ defaultProperties() {
36
+ return ['SchemaName', 'EntitySetName', 'IsManaged'];
37
+ }
38
+ commandAction(logger, args) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (this.verbose) {
41
+ logger.logToStderr(`Retrieving list of tables for which the user is an admin...`);
42
+ }
43
+ const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environment, args.options.asAdmin);
44
+ const requestOptions = {
45
+ url: `${dynamicsApiUrl}/api/data/v9.0/EntityDefinitions?$select=MetadataId,IsCustomEntity,IsManaged,SchemaName,IconVectorName,LogicalName,EntitySetName,IsActivity,DataProviderId,IsRenameable,IsCustomizable,CanCreateForms,CanCreateViews,CanCreateCharts,CanCreateAttributes,CanChangeTrackingBeEnabled,CanModifyAdditionalSettings,CanChangeHierarchicalRelationship,CanEnableSyncToExternalSearchIndex&$filter=(IsIntersect eq false and IsLogicalEntity eq false and%0APrimaryNameAttribute ne null and PrimaryNameAttribute ne %27%27 and ObjectTypeCode gt 0 and%0AObjectTypeCode ne 4712 and ObjectTypeCode ne 4724 and ObjectTypeCode ne 9933 and ObjectTypeCode ne 9934 and%0AObjectTypeCode ne 9935 and ObjectTypeCode ne 9947 and ObjectTypeCode ne 9945 and ObjectTypeCode ne 9944 and%0AObjectTypeCode ne 9942 and ObjectTypeCode ne 9951 and ObjectTypeCode ne 2016 and ObjectTypeCode ne 9949 and%0AObjectTypeCode ne 9866 and ObjectTypeCode ne 9867 and ObjectTypeCode ne 9868) and (IsCustomizable/Value eq true or IsCustomEntity eq true or IsManaged eq false or IsMappable/Value eq true or IsRenameable/Value eq true)&api-version=9.1`,
46
+ headers: {
47
+ accept: 'application/json;odata.metadata=none'
48
+ },
49
+ responseType: 'json'
50
+ };
51
+ try {
52
+ const res = yield request_1.default.get(requestOptions);
53
+ logger.log(res.value);
54
+ }
55
+ catch (err) {
56
+ this.handleRejectedODataJsonPromise(err);
57
+ }
58
+ });
59
+ }
60
+ }
61
+ _PpDataverseTableListCommand_instances = new WeakSet(), _PpDataverseTableListCommand_initTelemetry = function _PpDataverseTableListCommand_initTelemetry() {
62
+ this.telemetry.push((args) => {
63
+ Object.assign(this.telemetryProperties, {
64
+ asAdmin: !!args.options.asAdmin
65
+ });
66
+ });
67
+ }, _PpDataverseTableListCommand_initOptions = function _PpDataverseTableListCommand_initOptions() {
68
+ this.options.unshift({
69
+ option: '-e, --environment <environment>'
70
+ }, {
71
+ option: '-a, --asAdmin'
72
+ });
73
+ };
74
+ module.exports = new PpDataverseTableListCommand();
75
+ //# sourceMappingURL=dataverse-table-list.js.map
@@ -0,0 +1,45 @@
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
+ const request_1 = require("../../../../request");
13
+ const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
14
+ const commands_1 = require("../../commands");
15
+ class PpTenantSettingsListCommand extends PowerPlatformCommand_1.default {
16
+ get name() {
17
+ return commands_1.default.TENANT_SETTINGS_LIST;
18
+ }
19
+ get description() {
20
+ return 'Lists the global Power Platform tenant settings';
21
+ }
22
+ defaultProperties() {
23
+ return ['disableCapacityAllocationByEnvironmentAdmins', 'disableEnvironmentCreationByNonAdminUsers', 'disableNPSCommentsReachout', 'disablePortalsCreationByNonAdminUsers', 'disableSupportTicketsVisibleByAllUsers', 'disableSurveyFeedback', 'disableTrialEnvironmentCreationByNonAdminUsers', 'walkMeOptOut'];
24
+ }
25
+ commandAction(logger) {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ const requestOptions = {
28
+ url: `${this.resource}/providers/Microsoft.BusinessAppPlatform/listtenantsettings?api-version=2020-10-01`,
29
+ headers: {
30
+ accept: 'application/json'
31
+ },
32
+ responseType: 'json'
33
+ };
34
+ try {
35
+ const res = yield request_1.default.post(requestOptions);
36
+ logger.log(res);
37
+ }
38
+ catch (err) {
39
+ this.handleRejectedODataJsonPromise(err);
40
+ }
41
+ });
42
+ }
43
+ }
44
+ module.exports = new PpTenantSettingsListCommand();
45
+ //# sourceMappingURL=tenant-settings-list.js.map
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const prefix = 'pp';
4
4
  exports.default = {
5
+ DATAVERSE_TABLE_LIST: `${prefix} dataverse table list`,
5
6
  ENVIRONMENT_LIST: `${prefix} environment list`,
6
7
  GATEWAY_LIST: `${prefix} gateway list`,
7
8
  MANAGEMENTAPP_ADD: `${prefix} managementapp add`,
8
- MANAGEMENTAPP_LIST: `${prefix} managementapp list`
9
+ MANAGEMENTAPP_LIST: `${prefix} managementapp list`,
10
+ TENANT_SETTINGS_LIST: `${prefix} tenant settings list`
9
11
  };
10
12
  //# sourceMappingURL=commands.js.map
@@ -0,0 +1,180 @@
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 _SpoFileRoleAssignmentRemoveCommand_instances, _SpoFileRoleAssignmentRemoveCommand_initTelemetry, _SpoFileRoleAssignmentRemoveCommand_initOptions, _SpoFileRoleAssignmentRemoveCommand_initValidators, _SpoFileRoleAssignmentRemoveCommand_initOptionSets;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const Cli_1 = require("../../../../cli/Cli");
19
+ const request_1 = require("../../../../request");
20
+ const urlUtil_1 = require("../../../../utils/urlUtil");
21
+ const formatting_1 = require("../../../../utils/formatting");
22
+ const validation_1 = require("../../../../utils/validation");
23
+ const SpoCommand_1 = require("../../../base/SpoCommand");
24
+ const commands_1 = require("../../commands");
25
+ const SpoFileGetCommand = require("./file-get");
26
+ const SpoUserGetCommand = require("../user/user-get");
27
+ const SpoGroupGetCommand = require("../group/group-get");
28
+ class SpoFileRoleAssignmentRemoveCommand extends SpoCommand_1.default {
29
+ constructor() {
30
+ super();
31
+ _SpoFileRoleAssignmentRemoveCommand_instances.add(this);
32
+ __classPrivateFieldGet(this, _SpoFileRoleAssignmentRemoveCommand_instances, "m", _SpoFileRoleAssignmentRemoveCommand_initTelemetry).call(this);
33
+ __classPrivateFieldGet(this, _SpoFileRoleAssignmentRemoveCommand_instances, "m", _SpoFileRoleAssignmentRemoveCommand_initOptions).call(this);
34
+ __classPrivateFieldGet(this, _SpoFileRoleAssignmentRemoveCommand_instances, "m", _SpoFileRoleAssignmentRemoveCommand_initValidators).call(this);
35
+ __classPrivateFieldGet(this, _SpoFileRoleAssignmentRemoveCommand_instances, "m", _SpoFileRoleAssignmentRemoveCommand_initOptionSets).call(this);
36
+ }
37
+ get name() {
38
+ return commands_1.default.FILE_ROLEASSIGNMENT_REMOVE;
39
+ }
40
+ get description() {
41
+ return 'Removes a role assignment from a file.';
42
+ }
43
+ commandAction(logger, args) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ const removeRoleAssignment = () => __awaiter(this, void 0, void 0, function* () {
46
+ try {
47
+ const fileURL = yield this.getFileURL(args);
48
+ let principalId;
49
+ if (args.options.groupName) {
50
+ principalId = yield this.getGroupPrincipalId(args.options);
51
+ }
52
+ else if (args.options.upn) {
53
+ principalId = yield this.getUserPrincipalId(args.options);
54
+ }
55
+ else {
56
+ principalId = args.options.principalId;
57
+ }
58
+ const serverRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, fileURL);
59
+ const requestOptions = {
60
+ url: `${args.options.webUrl}/_api/web/GetFileByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields/roleassignments/removeroleassignment(principalid='${principalId}')`,
61
+ headers: {
62
+ accept: 'application/json;odata=nometadata'
63
+ },
64
+ responseType: 'json'
65
+ };
66
+ yield request_1.default.post(requestOptions);
67
+ }
68
+ catch (err) {
69
+ this.handleRejectedODataJsonPromise(err);
70
+ }
71
+ });
72
+ if (args.options.confirm) {
73
+ yield removeRoleAssignment();
74
+ }
75
+ else {
76
+ const result = yield Cli_1.Cli.prompt({
77
+ type: 'confirm',
78
+ name: 'continue',
79
+ default: false,
80
+ message: `Are you sure you want to remove role assignment from file ${args.options.fileUrl || args.options.fileId} from site ${args.options.webUrl}?`
81
+ });
82
+ if (result.continue) {
83
+ yield removeRoleAssignment();
84
+ }
85
+ }
86
+ });
87
+ }
88
+ getFileURL(args) {
89
+ return __awaiter(this, void 0, void 0, function* () {
90
+ if (args.options.fileUrl) {
91
+ return args.options.fileUrl;
92
+ }
93
+ const options = {
94
+ webUrl: args.options.webUrl,
95
+ id: args.options.fileId,
96
+ output: 'json',
97
+ debug: this.debug,
98
+ verbose: this.verbose
99
+ };
100
+ const output = yield Cli_1.Cli.executeCommandWithOutput(SpoFileGetCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) });
101
+ const getFileOutput = JSON.parse(output.stdout);
102
+ return getFileOutput.ServerRelativeUrl;
103
+ });
104
+ }
105
+ getUserPrincipalId(options) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ const userGetCommandOptions = {
108
+ webUrl: options.webUrl,
109
+ email: options.upn,
110
+ id: undefined,
111
+ output: 'json',
112
+ debug: this.debug,
113
+ verbose: this.verbose
114
+ };
115
+ const output = yield Cli_1.Cli.executeCommandWithOutput(SpoUserGetCommand, { options: Object.assign(Object.assign({}, userGetCommandOptions), { _: [] }) });
116
+ const getUserOutput = JSON.parse(output.stdout);
117
+ return getUserOutput.Id;
118
+ });
119
+ }
120
+ getGroupPrincipalId(options) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ const groupGetCommandOptions = {
123
+ webUrl: options.webUrl,
124
+ name: options.groupName,
125
+ output: 'json',
126
+ debug: this.debug,
127
+ verbose: this.verbose
128
+ };
129
+ const output = yield Cli_1.Cli.executeCommandWithOutput(SpoGroupGetCommand, { options: Object.assign(Object.assign({}, groupGetCommandOptions), { _: [] }) });
130
+ const getGroupOutput = JSON.parse(output.stdout);
131
+ return getGroupOutput.Id;
132
+ });
133
+ }
134
+ }
135
+ _SpoFileRoleAssignmentRemoveCommand_instances = new WeakSet(), _SpoFileRoleAssignmentRemoveCommand_initTelemetry = function _SpoFileRoleAssignmentRemoveCommand_initTelemetry() {
136
+ this.telemetry.push((args) => {
137
+ Object.assign(this.telemetryProperties, {
138
+ fileUrl: typeof args.options.fileUrl !== 'undefined',
139
+ fileId: typeof args.options.fileId !== 'undefined',
140
+ principalId: typeof args.options.principalId !== 'undefined',
141
+ upn: typeof args.options.upn !== 'undefined',
142
+ groupName: typeof args.options.groupName !== 'undefined',
143
+ confirm: !!args.options.confirm
144
+ });
145
+ });
146
+ }, _SpoFileRoleAssignmentRemoveCommand_initOptions = function _SpoFileRoleAssignmentRemoveCommand_initOptions() {
147
+ this.options.unshift({
148
+ option: '-u, --webUrl <webUrl>'
149
+ }, {
150
+ option: '--fileUrl [fileUrl]'
151
+ }, {
152
+ option: '-i, --fileId [fileId]'
153
+ }, {
154
+ option: '--principalId [principalId]'
155
+ }, {
156
+ option: '--upn [upn]'
157
+ }, {
158
+ option: '--groupName [groupName]'
159
+ }, {
160
+ option: '--confirm'
161
+ });
162
+ }, _SpoFileRoleAssignmentRemoveCommand_initValidators = function _SpoFileRoleAssignmentRemoveCommand_initValidators() {
163
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
164
+ const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
165
+ if (isValidSharePointUrl !== true) {
166
+ return isValidSharePointUrl;
167
+ }
168
+ if (args.options.principalId && isNaN(args.options.principalId)) {
169
+ return `Specified principalId ${args.options.principalId} is not a number`;
170
+ }
171
+ if (args.options.fileId && !validation_1.validation.isValidGuid(args.options.fileId)) {
172
+ return `${args.options.fileId} is not a valid GUID`;
173
+ }
174
+ return true;
175
+ }));
176
+ }, _SpoFileRoleAssignmentRemoveCommand_initOptionSets = function _SpoFileRoleAssignmentRemoveCommand_initOptionSets() {
177
+ this.optionSets.push(['fileUrl', 'fileId'], ['upn', 'groupName', 'principalId']);
178
+ };
179
+ module.exports = new SpoFileRoleAssignmentRemoveCommand();
180
+ //# sourceMappingURL=file-roleassignment-remove.js.map
@@ -56,6 +56,7 @@ exports.default = {
56
56
  FILE_MOVE: `${prefix} file move`,
57
57
  FILE_REMOVE: `${prefix} file remove`,
58
58
  FILE_RENAME: `${prefix} file rename`,
59
+ FILE_ROLEASSIGNMENT_REMOVE: `${prefix} file roleassignment remove`,
59
60
  FILE_ROLEINHERITANCE_RESET: `${prefix} file roleinheritance reset`,
60
61
  FILE_SHARINGINFO_GET: `${prefix} file sharinginfo get`,
61
62
  FOLDER_ADD: `${prefix} folder add`,
@@ -0,0 +1,42 @@
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.powerPlatform = void 0;
13
+ const request_1 = require("../request");
14
+ const powerPlatformResource = 'https://api.bap.microsoft.com';
15
+ exports.powerPlatform = {
16
+ getDynamicsInstanceApiUrl(environment, asAdmin) {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ let url = '';
19
+ if (asAdmin) {
20
+ url = `${powerPlatformResource}/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/${encodeURIComponent(environment)}`;
21
+ }
22
+ else {
23
+ url = `${powerPlatformResource}/providers/Microsoft.BusinessAppPlatform/environments/${encodeURIComponent(environment)}`;
24
+ }
25
+ const requestOptions = {
26
+ url: `${url}?api-version=2020-10-01&$select=properties.linkedEnvironmentMetadata.instanceApiUrl`,
27
+ headers: {
28
+ accept: 'application/json;odata.metadata=none'
29
+ },
30
+ responseType: 'json'
31
+ };
32
+ try {
33
+ const response = yield request_1.default.get(requestOptions);
34
+ return Promise.resolve(response.properties.linkedEnvironmentMetadata.instanceApiUrl);
35
+ }
36
+ catch (ex) {
37
+ throw Error(`The environment '${environment}' could not be retrieved. See the inner exception for more details: ${ex.message}`);
38
+ }
39
+ });
40
+ }
41
+ };
42
+ //# sourceMappingURL=powerPlatform.js.map
@@ -0,0 +1,33 @@
1
+ # pp dataverse table list
2
+
3
+ Lists dataverse tables in a given environment
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ pp dataverse table list [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-e, --environment <environment>`
14
+ The name of the environment to list all tables for
15
+
16
+ `-a, --asAdmin`
17
+ Set, to retrieve the dataverse tables as admin for environments you are not a member of.
18
+
19
+ --8<-- "docs/cmd/_global.md"
20
+
21
+ ## Examples
22
+
23
+ List all tables for the given environment
24
+
25
+ ```sh
26
+ m365 pp dataverse table list -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"
27
+ ```
28
+
29
+ List all tables for the given environment as Admin
30
+
31
+ ```sh
32
+ m365 pp dataverse table list -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --asAdmin
33
+ ```
@@ -0,0 +1,26 @@
1
+ # pp tenant settings list
2
+
3
+ Lists the global Power Platform tenant settings
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 pp tenant settings list [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ --8<-- "docs/cmd/_global.md"
14
+
15
+ ## Remarks
16
+
17
+ !!! attention
18
+ This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
19
+
20
+ ## Examples
21
+
22
+ Lists the global Power Platform settings of the tenant
23
+
24
+ ```sh
25
+ m365 pp tenant settings list
26
+ ```
@@ -0,0 +1,54 @@
1
+ # spo file roleassignment remove
2
+
3
+ Removes a role assignment from a file.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 spo file roleassignment remove [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-u, --webUrl <webUrl>`
14
+ : URL of the site where the file is located.
15
+
16
+ `--fileUrl [fileUrl]`
17
+ : The server-relative URL of the file. Specify either `fileUrl` or `fileId` but not both.
18
+
19
+ `-i, --fileId [fileId]`
20
+ : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
21
+
22
+ `--principalId [principalId]`
23
+ : The SharePoint Id of the principal. It may be either a user id or group id. Specify either `upn`, `groupName`, or `principalId`.
24
+
25
+ `--upn [upn]`
26
+ : Upn/email of the user. Specify either `upn`, `groupName`, or `principalId`.
27
+
28
+ `--groupName [groupName]`
29
+ : The group name of an Azure AD or SharePoint group. Specify either `upn`, `groupName`, or `principalId`.
30
+
31
+ `--confirm [confirm]`
32
+ : Don't prompt for confirmation.
33
+
34
+ --8<-- "docs/cmd/_global.md"
35
+
36
+ ## Examples
37
+
38
+ Remove a role assignment by principal id from a file by id
39
+
40
+ ```sh
41
+ m365 spo file roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --fileId "b2307a39-e878-458b-bc90-03bc578531d6" --principalId 2
42
+ ```
43
+
44
+ Remove a role assignment by upn from a file by url
45
+
46
+ ```sh
47
+ m365 spo file roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --fileUrl "/sites/contoso-sales/documents/Test1.docx" --upn "user1@contoso.onmicrosoft.com"
48
+ ```
49
+
50
+ Remove a role assignment by group name from a file by id
51
+
52
+ ```sh
53
+ m365 spo file roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --fileId "b2307a39-e878-458b-bc90-03bc578531d6" --groupName "saleGroup"
54
+ ```
@@ -29,8 +29,8 @@ Reset inheritance of folder with site-relative url _Shared Documents/TestFolder_
29
29
  m365 spo folder roleinheritance reset --webUrl "https://contoso.sharepoint.com/sites/project-x" --folderUrl "Shared Documents/TestFolder"
30
30
  ```
31
31
 
32
- Reset inheritance of folder with site-relative url _Shared Documents/TestFolder_ located in site _https://contoso.sharepoint.com/sites/project-x_. It will **not** prompt for confirmation before resetting.
32
+ Reset inheritance of folder with server-relative url _/sites/project-x/Shared Documents/TestFolder_ located in site _https://contoso.sharepoint.com/sites/project-x_. It will **not** prompt for confirmation before resetting.
33
33
 
34
34
  ```sh
35
- m365 spo folder roleinheritance reset --webUrl "https://contoso.sharepoint.com/sites/project-x" --folderUrl "Shared Documents/TestFolder" --confirm
35
+ m365 spo folder roleinheritance reset --webUrl "https://contoso.sharepoint.com/sites/project-x" --folderUrl "/sites/project-x/Shared Documents/TestFolder" --confirm
36
36
  ```
@@ -1,6 +1,6 @@
1
1
  # spo hubsite disconnect
2
2
 
3
- Disconnects the specifies site collection from its hub site
3
+ Disconnects the specified site collection from its hub site
4
4
 
5
5
  ## Usage
6
6
 
@@ -11,13 +11,13 @@ m365 spo hubsite get [options]
11
11
  ## Options
12
12
 
13
13
  `-i, --id [id]`
14
- : ID of the hubsite. Specify either `id`, `title` or `url` but not multiple.
14
+ : ID of the hub site. Specify either `id`, `title` or `url` but not multiple.
15
15
 
16
16
  `-t, --title [title]`
17
- : Title of the hubsite. Specify either `id`, `title` or `url` but not multiple.
17
+ : Title of the hub site. Specify either `id`, `title` or `url` but not multiple.
18
18
 
19
19
  `-u, --url [url]`
20
- : URL of the hubsite. Specify either `id`, `title` or `url` but not multiple.
20
+ : URL of the hub site. Specify either `id`, `title` or `url` but not multiple.
21
21
 
22
22
  `--includeAssociatedSites`
23
23
  : Include the associated sites in the result (only in JSON output)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "5.9.0-beta.005c47a",
3
+ "version": "5.9.0-beta.1672f8f",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",