@pnp/cli-microsoft365 10.6.0-beta.807bbab → 10.6.0-beta.8ecef43
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 +2 -1
- package/dist/Command.js +10 -0
- package/dist/auth/MsalNetworkClient.js +48 -0
- package/dist/config.js +1 -0
- package/dist/m365/entra/commands/group/group-member-add.js +1 -1
- package/dist/m365/entra/commands/group/group-member-remove.js +197 -0
- package/dist/m365/entra/commands/policy/policy-list.js +46 -3
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/flow/commands/flow-list.js +1 -1
- package/dist/m365/graph/commands/openextension/openextension-get.js +57 -0
- package/dist/m365/graph/commands/openextension/openextension-list.js +62 -0
- package/dist/m365/graph/commands/openextension/openextension-remove.js +68 -0
- package/dist/m365/graph/commands.js +3 -0
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +9 -2
- package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +0 -19
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.21.0.js +25 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +0 -16
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3.js +13 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.21.0.js +63 -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/util/commands/accesstoken/accesstoken-get.js +13 -3
- package/dist/utils/accessToken.js +8 -0
- package/dist/utils/prompt.js +9 -2
- package/dist/utils/types.js +1 -0
- package/docs/docs/cmd/entra/group/group-member-add.mdx +1 -1
- package/docs/docs/cmd/entra/group/group-member-remove.mdx +96 -0
- package/docs/docs/cmd/entra/policy/policy-list.mdx +1 -1
- package/docs/docs/cmd/graph/openextension/openextension-get.mdx +111 -0
- package/docs/docs/cmd/graph/openextension/openextension-list.mdx +129 -0
- package/docs/docs/cmd/graph/openextension/openextension-remove.mdx +59 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -4
- package/docs/docs/cmd/util/accesstoken/accesstoken-get.mdx +72 -0
- package/package.json +1 -1
|
@@ -13,7 +13,6 @@ import { BaseProjectCommand } from './base-project-command.js';
|
|
|
13
13
|
import { validation } from '../../../../utils/validation.js';
|
|
14
14
|
import { pipeline } from './DeployWorkflow.js';
|
|
15
15
|
import { fsUtil } from '../../../../utils/fsUtil.js';
|
|
16
|
-
import { parse } from 'semver';
|
|
17
16
|
class SpfxProjectAzureDevOpsPipelineAddCommand extends BaseProjectCommand {
|
|
18
17
|
get name() {
|
|
19
18
|
return commands.PROJECT_AZUREDEVOPS_PIPELINE_ADD;
|
|
@@ -65,20 +64,6 @@ class SpfxProjectAzureDevOpsPipelineAddCommand extends BaseProjectCommand {
|
|
|
65
64
|
if (options.branchName) {
|
|
66
65
|
pipeline.trigger.branches.include[0] = options.branchName;
|
|
67
66
|
}
|
|
68
|
-
const version = this.getProjectVersion();
|
|
69
|
-
if (!version) {
|
|
70
|
-
throw `Unable to determine the version of the current SharePoint Framework project`;
|
|
71
|
-
}
|
|
72
|
-
const minorVersion = parse(version)?.minor;
|
|
73
|
-
if (minorVersion === undefined) {
|
|
74
|
-
throw `Unable to determine the minor version of the current SharePoint Framework project`;
|
|
75
|
-
}
|
|
76
|
-
if (minorVersion < 18) {
|
|
77
|
-
const node = this.getNodeAction(pipeline);
|
|
78
|
-
if (node.inputs) {
|
|
79
|
-
node.inputs.versionSpec = '16.x';
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
67
|
const script = this.getScriptAction(pipeline);
|
|
83
68
|
if (script.script) {
|
|
84
69
|
if (options.loginMethod === 'user') {
|
|
@@ -122,10 +107,6 @@ class SpfxProjectAzureDevOpsPipelineAddCommand extends BaseProjectCommand {
|
|
|
122
107
|
const steps = this.getPipelineSteps(pipeline);
|
|
123
108
|
return steps.find(step => step.script);
|
|
124
109
|
}
|
|
125
|
-
getNodeAction(pipeline) {
|
|
126
|
-
const steps = this.getPipelineSteps(pipeline);
|
|
127
|
-
return steps.find(step => step.task && step.task.indexOf('NodeTool') >= 0);
|
|
128
|
-
}
|
|
129
110
|
getPipelineSteps(pipeline) {
|
|
130
111
|
return pipeline.stages[0].jobs[0].steps;
|
|
131
112
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FN002021_DEVDEP_rushstack_eslint_config } from '../project-upgrade/rules/FN002021_DEVDEP_rushstack_eslint_config.js';
|
|
2
|
+
import { FN001008_DEP_react } from './rules/FN001008_DEP_react.js';
|
|
3
|
+
import { FN001009_DEP_react_dom } from './rules/FN001009_DEP_react_dom.js';
|
|
4
|
+
import { FN001035_DEP_fluentui_react } from './rules/FN001035_DEP_fluentui_react.js';
|
|
5
|
+
import { FN002004_DEVDEP_gulp } from './rules/FN002004_DEVDEP_gulp.js';
|
|
6
|
+
import { FN002007_DEVDEP_ajv } from './rules/FN002007_DEVDEP_ajv.js';
|
|
7
|
+
import { FN002013_DEVDEP_types_webpack_env } from './rules/FN002013_DEVDEP_types_webpack_env.js';
|
|
8
|
+
import { FN002015_DEVDEP_types_react } from './rules/FN002015_DEVDEP_types_react.js';
|
|
9
|
+
import { FN002016_DEVDEP_types_react_dom } from './rules/FN002016_DEVDEP_types_react_dom.js';
|
|
10
|
+
import { FN002019_DEVDEP_microsoft_rush_stack_compiler } from './rules/FN002019_DEVDEP_microsoft_rush_stack_compiler.js';
|
|
11
|
+
import { FN021001_PKG_spfx_deps_versions_match_project_version } from './rules/FN021001_PKG_spfx_deps_versions_match_project_version.js';
|
|
12
|
+
export default [
|
|
13
|
+
new FN001008_DEP_react('17'),
|
|
14
|
+
new FN001009_DEP_react_dom('17'),
|
|
15
|
+
new FN001035_DEP_fluentui_react('^8.106.4'),
|
|
16
|
+
new FN002004_DEVDEP_gulp('4.0.2'),
|
|
17
|
+
new FN002007_DEVDEP_ajv('^6.12.5'),
|
|
18
|
+
new FN002013_DEVDEP_types_webpack_env('~1.15.2'),
|
|
19
|
+
new FN002015_DEVDEP_types_react('17'),
|
|
20
|
+
new FN002016_DEVDEP_types_react_dom('17'),
|
|
21
|
+
new FN002019_DEVDEP_microsoft_rush_stack_compiler(['5.3']),
|
|
22
|
+
new FN002021_DEVDEP_rushstack_eslint_config('4.0.1'),
|
|
23
|
+
new FN021001_PKG_spfx_deps_versions_match_project_version(true)
|
|
24
|
+
];
|
|
25
|
+
//# sourceMappingURL=doctor-1.21.0.js.map
|
|
@@ -71,7 +71,8 @@ class SpfxProjectDoctorCommand extends BaseProjectCommand {
|
|
|
71
71
|
'1.18.1',
|
|
72
72
|
'1.18.2',
|
|
73
73
|
'1.19.0',
|
|
74
|
-
'1.20.0'
|
|
74
|
+
'1.20.0',
|
|
75
|
+
'1.21.0'
|
|
75
76
|
];
|
|
76
77
|
__classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initTelemetry).call(this);
|
|
77
78
|
__classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initOptions).call(this);
|
|
@@ -13,7 +13,6 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
14
|
import { workflow } from './DeployWorkflow.js';
|
|
15
15
|
import { BaseProjectCommand } from './base-project-command.js';
|
|
16
|
-
import { parse } from 'semver';
|
|
17
16
|
class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
|
|
18
17
|
get name() {
|
|
19
18
|
return commands.PROJECT_GITHUB_WORKFLOW_ADD;
|
|
@@ -64,17 +63,6 @@ class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
|
|
|
64
63
|
// eslint-disable-next-line camelcase
|
|
65
64
|
workflow.on.workflow_dispatch = null;
|
|
66
65
|
}
|
|
67
|
-
const version = this.getProjectVersion();
|
|
68
|
-
if (!version) {
|
|
69
|
-
throw `Unable to determine the version of the current SharePoint Framework project`;
|
|
70
|
-
}
|
|
71
|
-
const minorVersion = parse(version)?.minor;
|
|
72
|
-
if (minorVersion === undefined) {
|
|
73
|
-
throw `Unable to determine the minor version of the current SharePoint Framework project`;
|
|
74
|
-
}
|
|
75
|
-
if (minorVersion < 18) {
|
|
76
|
-
this.getNodeAction(workflow).with['node-version'] = '16.x';
|
|
77
|
-
}
|
|
78
66
|
if (options.skipFeatureDeployment) {
|
|
79
67
|
this.getDeployAction(workflow).with.SKIP_FEATURE_DEPLOYMENT = true;
|
|
80
68
|
}
|
|
@@ -103,10 +91,6 @@ class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
|
|
|
103
91
|
const steps = this.getWorkFlowSteps(workflow);
|
|
104
92
|
return steps.find(step => step.uses && step.uses.indexOf('action-cli-deploy') >= 0);
|
|
105
93
|
}
|
|
106
|
-
getNodeAction(workflow) {
|
|
107
|
-
const steps = this.getWorkFlowSteps(workflow);
|
|
108
|
-
return steps.find(step => step.uses && step.uses.indexOf('actions/setup-node@') >= 0);
|
|
109
|
-
}
|
|
110
94
|
getWorkFlowSteps(workflow) {
|
|
111
95
|
return workflow.jobs['build-and-deploy'].steps;
|
|
112
96
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DependencyRule } from "./DependencyRule.js";
|
|
2
|
+
export class FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3 extends DependencyRule {
|
|
3
|
+
constructor(packageVersion) {
|
|
4
|
+
super('@microsoft/rush-stack-compiler-5.3', packageVersion, true);
|
|
5
|
+
}
|
|
6
|
+
get id() {
|
|
7
|
+
return 'FN002029';
|
|
8
|
+
}
|
|
9
|
+
get supersedes() {
|
|
10
|
+
return ['FN002010', 'FN002011', 'FN002012', 'FN002017', 'FN002018', 'FN002020', 'FN002028'];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3.js.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FN001001_DEP_microsoft_sp_core_library } from './rules/FN001001_DEP_microsoft_sp_core_library.js';
|
|
2
|
+
import { FN001002_DEP_microsoft_sp_lodash_subset } from './rules/FN001002_DEP_microsoft_sp_lodash_subset.js';
|
|
3
|
+
import { FN001003_DEP_microsoft_sp_office_ui_fabric_core } from './rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core.js';
|
|
4
|
+
import { FN001004_DEP_microsoft_sp_webpart_base } from './rules/FN001004_DEP_microsoft_sp_webpart_base.js';
|
|
5
|
+
import { FN001011_DEP_microsoft_sp_dialog } from './rules/FN001011_DEP_microsoft_sp_dialog.js';
|
|
6
|
+
import { FN001012_DEP_microsoft_sp_application_base } from './rules/FN001012_DEP_microsoft_sp_application_base.js';
|
|
7
|
+
import { FN001013_DEP_microsoft_decorators } from './rules/FN001013_DEP_microsoft_decorators.js';
|
|
8
|
+
import { FN001014_DEP_microsoft_sp_listview_extensibility } from './rules/FN001014_DEP_microsoft_sp_listview_extensibility.js';
|
|
9
|
+
import { FN001021_DEP_microsoft_sp_property_pane } from './rules/FN001021_DEP_microsoft_sp_property_pane.js';
|
|
10
|
+
import { FN001023_DEP_microsoft_sp_component_base } from './rules/FN001023_DEP_microsoft_sp_component_base.js';
|
|
11
|
+
import { FN001024_DEP_microsoft_sp_diagnostics } from './rules/FN001024_DEP_microsoft_sp_diagnostics.js';
|
|
12
|
+
import { FN001025_DEP_microsoft_sp_dynamic_data } from './rules/FN001025_DEP_microsoft_sp_dynamic_data.js';
|
|
13
|
+
import { FN001026_DEP_microsoft_sp_extension_base } from './rules/FN001026_DEP_microsoft_sp_extension_base.js';
|
|
14
|
+
import { FN001027_DEP_microsoft_sp_http } from './rules/FN001027_DEP_microsoft_sp_http.js';
|
|
15
|
+
import { FN001028_DEP_microsoft_sp_list_subscription } from './rules/FN001028_DEP_microsoft_sp_list_subscription.js';
|
|
16
|
+
import { FN001029_DEP_microsoft_sp_loader } from './rules/FN001029_DEP_microsoft_sp_loader.js';
|
|
17
|
+
import { FN001030_DEP_microsoft_sp_module_interfaces } from './rules/FN001030_DEP_microsoft_sp_module_interfaces.js';
|
|
18
|
+
import { FN001031_DEP_microsoft_sp_odata_types } from './rules/FN001031_DEP_microsoft_sp_odata_types.js';
|
|
19
|
+
import { FN001032_DEP_microsoft_sp_page_context } from './rules/FN001032_DEP_microsoft_sp_page_context.js';
|
|
20
|
+
import { FN001034_DEP_microsoft_sp_adaptive_card_extension_base } from './rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base.js';
|
|
21
|
+
import { FN002001_DEVDEP_microsoft_sp_build_web } from './rules/FN002001_DEVDEP_microsoft_sp_build_web.js';
|
|
22
|
+
import { FN002002_DEVDEP_microsoft_sp_module_interfaces } from './rules/FN002002_DEVDEP_microsoft_sp_module_interfaces.js';
|
|
23
|
+
import { FN002022_DEVDEP_microsoft_eslint_plugin_spfx } from './rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js';
|
|
24
|
+
import { FN002023_DEVDEP_microsoft_eslint_config_spfx } from './rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js';
|
|
25
|
+
import { FN002024_DEVDEP_eslint } from './rules/FN002024_DEVDEP_eslint.js';
|
|
26
|
+
import { FN002026_DEVDEP_typescript } from './rules/FN002026_DEVDEP_typescript.js';
|
|
27
|
+
import { FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3 } from './rules/FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3.js';
|
|
28
|
+
import { FN010001_YORC_version } from './rules/FN010001_YORC_version.js';
|
|
29
|
+
import { FN012017_TSC_extends } from './rules/FN012017_TSC_extends.js';
|
|
30
|
+
import { FN021003_PKG_engines_node } from './rules/FN021003_PKG_engines_node.js';
|
|
31
|
+
export default [
|
|
32
|
+
new FN001001_DEP_microsoft_sp_core_library('1.21.0'),
|
|
33
|
+
new FN001002_DEP_microsoft_sp_lodash_subset('1.21.0'),
|
|
34
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.21.0'),
|
|
35
|
+
new FN001004_DEP_microsoft_sp_webpart_base('1.21.0'),
|
|
36
|
+
new FN001011_DEP_microsoft_sp_dialog('1.21.0'),
|
|
37
|
+
new FN001012_DEP_microsoft_sp_application_base('1.21.0'),
|
|
38
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility('1.21.0'),
|
|
39
|
+
new FN001021_DEP_microsoft_sp_property_pane('1.21.0'),
|
|
40
|
+
new FN001023_DEP_microsoft_sp_component_base('1.21.0'),
|
|
41
|
+
new FN001024_DEP_microsoft_sp_diagnostics('1.21.0'),
|
|
42
|
+
new FN001025_DEP_microsoft_sp_dynamic_data('1.21.0'),
|
|
43
|
+
new FN001026_DEP_microsoft_sp_extension_base('1.21.0'),
|
|
44
|
+
new FN001027_DEP_microsoft_sp_http('1.21.0'),
|
|
45
|
+
new FN001028_DEP_microsoft_sp_list_subscription('1.21.0'),
|
|
46
|
+
new FN001029_DEP_microsoft_sp_loader('1.21.0'),
|
|
47
|
+
new FN001030_DEP_microsoft_sp_module_interfaces('1.21.0'),
|
|
48
|
+
new FN001031_DEP_microsoft_sp_odata_types('1.21.0'),
|
|
49
|
+
new FN001032_DEP_microsoft_sp_page_context('1.21.0'),
|
|
50
|
+
new FN001013_DEP_microsoft_decorators('1.21.0'),
|
|
51
|
+
new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.21.0'),
|
|
52
|
+
new FN002001_DEVDEP_microsoft_sp_build_web('1.21.0'),
|
|
53
|
+
new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.21.0'),
|
|
54
|
+
new FN002024_DEVDEP_eslint('8.57.1'),
|
|
55
|
+
new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.21.0'),
|
|
56
|
+
new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.21.0'),
|
|
57
|
+
new FN002026_DEVDEP_typescript('5.3.3'),
|
|
58
|
+
new FN002029_DEVDEP_microsoft_rush_stack_compiler_5_3('0.1.0'),
|
|
59
|
+
new FN010001_YORC_version('1.21.0'),
|
|
60
|
+
new FN012017_TSC_extends('./node_modules/@microsoft/rush-stack-compiler-5.3/includes/tsconfig-web.json'),
|
|
61
|
+
new FN021003_PKG_engines_node('>=22.14.0 < 23.0.0')
|
|
62
|
+
];
|
|
63
|
+
//# sourceMappingURL=upgrade-1.21.0.js.map
|
|
@@ -73,7 +73,8 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
|
|
|
73
73
|
'1.18.1',
|
|
74
74
|
'1.18.2',
|
|
75
75
|
'1.19.0',
|
|
76
|
-
'1.20.0'
|
|
76
|
+
'1.20.0',
|
|
77
|
+
'1.21.0'
|
|
77
78
|
];
|
|
78
79
|
__classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initTelemetry).call(this);
|
|
79
80
|
__classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initOptions).call(this);
|
|
@@ -590,6 +590,21 @@ class SpfxDoctorCommand extends BaseProjectCommand {
|
|
|
590
590
|
range: '^4 || ^5',
|
|
591
591
|
fix: 'npm i -g yo@5'
|
|
592
592
|
}
|
|
593
|
+
},
|
|
594
|
+
'1.21.0': {
|
|
595
|
+
gulpCli: {
|
|
596
|
+
range: '^1 || ^2 || ^3',
|
|
597
|
+
fix: 'npm i -g gulp-cli@3'
|
|
598
|
+
},
|
|
599
|
+
node: {
|
|
600
|
+
range: '>=22.14.0 < 23.0.0',
|
|
601
|
+
fix: 'Install Node.js >=22.14.0 < 23.0.0'
|
|
602
|
+
},
|
|
603
|
+
sp: SharePointVersion.SPO,
|
|
604
|
+
yo: {
|
|
605
|
+
range: '^4 || ^5',
|
|
606
|
+
fix: 'npm i -g yo@5'
|
|
607
|
+
}
|
|
593
608
|
}
|
|
594
609
|
};
|
|
595
610
|
this.output = '';
|
|
@@ -7,6 +7,7 @@ var _UtilAccessTokenGetCommand_instances, _UtilAccessTokenGetCommand_initTelemet
|
|
|
7
7
|
import auth, { Auth } from '../../../../Auth.js';
|
|
8
8
|
import Command from '../../../../Command.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
+
import { accessToken } from '../../../../utils/accessToken.js';
|
|
10
11
|
class UtilAccessTokenGetCommand extends Command {
|
|
11
12
|
get name() {
|
|
12
13
|
return commands.ACCESSTOKEN_GET;
|
|
@@ -34,8 +35,14 @@ class UtilAccessTokenGetCommand extends Command {
|
|
|
34
35
|
resource = Auth.getEndpointForResource('https://graph.microsoft.com', auth.connection.cloudType);
|
|
35
36
|
}
|
|
36
37
|
try {
|
|
37
|
-
const
|
|
38
|
-
|
|
38
|
+
const token = await auth.ensureAccessToken(resource, logger, this.debug, args.options.new);
|
|
39
|
+
if (args.options.decoded) {
|
|
40
|
+
const { header, payload } = accessToken.getDecodedAccessToken(token);
|
|
41
|
+
await logger.logRaw(`${JSON.stringify(header, null, 2)}.${JSON.stringify(payload, null, 2)}.[signature]`);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
await logger.log(token);
|
|
45
|
+
}
|
|
39
46
|
}
|
|
40
47
|
catch (err) {
|
|
41
48
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -45,7 +52,8 @@ class UtilAccessTokenGetCommand extends Command {
|
|
|
45
52
|
_UtilAccessTokenGetCommand_instances = new WeakSet(), _UtilAccessTokenGetCommand_initTelemetry = function _UtilAccessTokenGetCommand_initTelemetry() {
|
|
46
53
|
this.telemetry.push((args) => {
|
|
47
54
|
Object.assign(this.telemetryProperties, {
|
|
48
|
-
new: args.options.new
|
|
55
|
+
new: args.options.new,
|
|
56
|
+
decoded: args.options.decoded
|
|
49
57
|
});
|
|
50
58
|
});
|
|
51
59
|
}, _UtilAccessTokenGetCommand_initOptions = function _UtilAccessTokenGetCommand_initOptions() {
|
|
@@ -53,6 +61,8 @@ _UtilAccessTokenGetCommand_instances = new WeakSet(), _UtilAccessTokenGetCommand
|
|
|
53
61
|
option: '-r, --resource <resource>'
|
|
54
62
|
}, {
|
|
55
63
|
option: '--new'
|
|
64
|
+
}, {
|
|
65
|
+
option: '--decoded'
|
|
56
66
|
});
|
|
57
67
|
};
|
|
58
68
|
export default new UtilAccessTokenGetCommand();
|
|
@@ -75,6 +75,14 @@ export const accessToken = {
|
|
|
75
75
|
}
|
|
76
76
|
return userId;
|
|
77
77
|
},
|
|
78
|
+
getDecodedAccessToken(accessToken) {
|
|
79
|
+
const chunks = accessToken.split('.');
|
|
80
|
+
const headerString = Buffer.from(chunks[0], 'base64').toString();
|
|
81
|
+
const payloadString = Buffer.from(chunks[1], 'base64').toString();
|
|
82
|
+
const header = JSON.parse(headerString);
|
|
83
|
+
const payload = JSON.parse(payloadString);
|
|
84
|
+
return { header, payload };
|
|
85
|
+
},
|
|
78
86
|
/**
|
|
79
87
|
* Asserts the presence of a delegated access token.
|
|
80
88
|
* @throws {CommandError} Will throw an error if the access token is not available.
|
package/dist/utils/prompt.js
CHANGED
|
@@ -6,13 +6,20 @@ let inquirerSelect;
|
|
|
6
6
|
;
|
|
7
7
|
;
|
|
8
8
|
export const prompt = {
|
|
9
|
-
/* c8 ignore next
|
|
9
|
+
/* c8 ignore next 16 */
|
|
10
10
|
async forInput(config) {
|
|
11
11
|
if (!inquirerInput) {
|
|
12
12
|
inquirerInput = await import('@inquirer/input');
|
|
13
13
|
}
|
|
14
14
|
const errorOutput = cli.getSettingWithDefaultValue(settingsNames.errorOutput, 'stderr');
|
|
15
|
-
return inquirerInput
|
|
15
|
+
return inquirerInput
|
|
16
|
+
.default(config, { output: errorOutput === 'stderr' ? process.stderr : process.stdout })
|
|
17
|
+
.catch(error => {
|
|
18
|
+
if (error instanceof Error && error.name === 'ExitPromptError') {
|
|
19
|
+
return ''; // noop; handle Ctrl + C
|
|
20
|
+
}
|
|
21
|
+
throw error;
|
|
22
|
+
});
|
|
16
23
|
},
|
|
17
24
|
/* c8 ignore next 9 */
|
|
18
25
|
async forConfirmation(config) {
|
package/dist/utils/types.js
CHANGED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# entra group member remove
|
|
4
|
+
|
|
5
|
+
Removes members from a Microsoft Entra group
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 entra group member remove [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 `groupName` but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --groupName [groupName]`
|
|
20
|
+
: The display name of the Entra ID group. Specify `groupId` or `groupName` but not both.
|
|
21
|
+
|
|
22
|
+
`--userIds [userIds]`
|
|
23
|
+
: Microsoft Entra user IDs. You can also pass a comma-separated list of IDs. Specify either `userIds`, `userNames`, `subgroupIds` or `subgroupNames` but not multiple.
|
|
24
|
+
|
|
25
|
+
`--userNames [userNames]`
|
|
26
|
+
: The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `userIds`, `userNames`, `subgroupIds` or `subgroupNames` but not multiple.
|
|
27
|
+
|
|
28
|
+
`--subgroupIds [subgroupIds]`
|
|
29
|
+
: Microsoft Entra group IDs. You can also pass a comma-separated list of IDs. Specify either `userIds`, `userNames`, `subgroupIds` or `subgroupNames` but not multiple.
|
|
30
|
+
|
|
31
|
+
`--subgroupNames [subgroupNames]`
|
|
32
|
+
: The display names of Microsoft Entra groups. You can also pass a comma-separated list of group display names. Specify either `userIds`, `userNames`, `subgroupIds` or `subgroupNames` but not multiple.
|
|
33
|
+
|
|
34
|
+
`-r, --role [role]`
|
|
35
|
+
: The role to be removed from the users. Valid values: `Owner`, `Member`. Defaults to both.
|
|
36
|
+
|
|
37
|
+
`--suppressNotFound`
|
|
38
|
+
: Suppress errors when a user was not found in a group.
|
|
39
|
+
|
|
40
|
+
`-f, --force`
|
|
41
|
+
: Don't prompt for confirmation.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
<Global />
|
|
45
|
+
|
|
46
|
+
## Remarks
|
|
47
|
+
|
|
48
|
+
:::tip
|
|
49
|
+
|
|
50
|
+
When you use the `suppressNotFound` option, the command will not return an error if a user is not found as either an owner or a member of the group.
|
|
51
|
+
This feature proves useful when you need to remove a user from a group, but you are uncertain whether the user holds the role of a member or an owner within that group.
|
|
52
|
+
Without using this option, you would need to manually verify the user's role in the group before proceeding with removal.
|
|
53
|
+
|
|
54
|
+
:::
|
|
55
|
+
|
|
56
|
+
## Examples
|
|
57
|
+
|
|
58
|
+
Remove a single user specified by ID as member from a group specified by display name
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
m365 entra group member remove --groupName Developers --userIds 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Remove multiple users specified by ID from a group specified by ID
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
m365 entra group member remove --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userIds "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Remove a single user specified by UPN as an owner from a group specified by display name
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
m365 entra group member remove --groupName Developers --userNames john.doe@contoso.com --role Owner
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Remove multiple users specified by UPN from a group specified by ID
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
m365 entra group member remove --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userNames "john.doe@contoso.com,adele.vance@contoso.com"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Remove a single user specified by ID as owner and member of the group and suppress errors when the user was not found as owner or member
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
m365 entra group member remove --groupName Developers --userIds 098b9f52-f48c-4401-819f-29c33794c3f5 --suppressNotFound
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Remove 2 nested groups referenced by id from a security group
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
m365 entra group member remove --groupName Developers --subgroupIds "b51b6157-839f-4d92-8dab-ac61b53c6c40,1e793f86-8dc6-4df6-8037-649ef9a22330" --role Member
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Response
|
|
95
|
+
|
|
96
|
+
The command doesn't return a response on success.
|
|
@@ -16,7 +16,7 @@ m365 entra policy list [options]
|
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-t, --type [type]`
|
|
19
|
-
: The type of policies to return. Allowed values `activityBasedTimeout`, `authorization`, `claimsMapping`, `homeRealmDiscovery`, `identitySecurityDefaultsEnforcement`, `tokenIssuance`, `tokenLifetime`. If omitted, all policies are returned.
|
|
19
|
+
: The type of policies to return. Allowed values `activityBasedTimeout`, `adminConsentRequest`, `appManagement`, `authenticationFlows`, `authenticationMethods`, `authenticationStrength`, `authorization`, `claimsMapping`, `conditionalAccess`, `crossTenantAccess`, `defaultAppManagement`, `deviceRegistration`, `featureRolloutPolicy`, `homeRealmDiscovery`, `identitySecurityDefaultsEnforcement`, `permissionGrant`, `roleManagement`, `tokenIssuance`, `tokenLifetime`. If omitted, all policies are returned.
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
<Global />
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# graph openextension get
|
|
6
|
+
|
|
7
|
+
Retrieves a specific open extension for a resource
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 graph openextension get [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-n, --name <name>`
|
|
19
|
+
: The name of the open extension to retrieve.
|
|
20
|
+
|
|
21
|
+
`-i, --resourceId <resourceId>`
|
|
22
|
+
: The Id of the resource for which to retrieve the open extension.
|
|
23
|
+
|
|
24
|
+
`-t, --resourceType <resourceType>`
|
|
25
|
+
: The type of resource. Allowed values are `user`, `group`, `device`, `organization`.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
<Global />
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
Retrieve a specified open extension for a user specified by id.
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
m365 graph openextension get --resourceId eb77fbcf-6fe8-458b-985d-1747284793bc --name 'com.contoso.roamingSettings' --resourceType user
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Retrieve a specified open extension for a user specified by UPN.
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 graph openextension get --resourceId john.doe@contoso.com --name 'com.contoso.roamingSettings' --resourceType user
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Response
|
|
45
|
+
|
|
46
|
+
<Tabs>
|
|
47
|
+
<TabItem value="JSON">
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"extensionName": "com.contoso.roamingSettings",
|
|
52
|
+
"name": "com.contoso.roamingSettings",
|
|
53
|
+
"resourceId": "john.doe@contoso.com",
|
|
54
|
+
"resourceType": "user",
|
|
55
|
+
"theme": "dark",
|
|
56
|
+
"color": "red",
|
|
57
|
+
"language": "English",
|
|
58
|
+
"id": "com.contoso.roamingSettings"
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
</TabItem>
|
|
63
|
+
<TabItem value="Text">
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
color : red
|
|
67
|
+
extensionName: com.contoso.roamingSettings
|
|
68
|
+
id : com.contoso.roamingSettings
|
|
69
|
+
language : English
|
|
70
|
+
name : com.contoso.roamingSettings
|
|
71
|
+
resourceId : john.doe@contoso.com
|
|
72
|
+
resourceType : user
|
|
73
|
+
theme : dark
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
</TabItem>
|
|
77
|
+
<TabItem value="CSV">
|
|
78
|
+
|
|
79
|
+
```csv
|
|
80
|
+
extensionName,name,resourceId,resourceType,theme,color,language,id
|
|
81
|
+
com.contoso.roamingSettings,com.contoso.roamingSettings,john.doe@contoso.com,user,dark,red,English,com.contoso.roamingSettings
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
</TabItem>
|
|
85
|
+
<TabItem value="Markdown">
|
|
86
|
+
|
|
87
|
+
```md
|
|
88
|
+
# graph openextension get --debug "false" --verbose "false" --resourceId "john.doe@contoso.com" --resourceType "user" --name "com.contoso.roamingSettings"
|
|
89
|
+
|
|
90
|
+
Date: 2025-04-07
|
|
91
|
+
|
|
92
|
+
## com.contoso.roamingSettings (com.contoso.roamingSettings)
|
|
93
|
+
|
|
94
|
+
Property | Value
|
|
95
|
+
---------|-------
|
|
96
|
+
extensionName | com.contoso.roamingSettings
|
|
97
|
+
name | com.contoso.roamingSettings
|
|
98
|
+
resourceId | john.doe@contoso.com
|
|
99
|
+
resourceType | user
|
|
100
|
+
theme | dark
|
|
101
|
+
color | red
|
|
102
|
+
language | English
|
|
103
|
+
id | com.contoso.roamingSettings
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
</TabItem>
|
|
107
|
+
</Tabs>
|
|
108
|
+
|
|
109
|
+
## More information
|
|
110
|
+
|
|
111
|
+
- Open extensions: https://learn.microsoft.com/graph/extensibility-overview?tabs=http#open-extensions
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# graph openextension list
|
|
6
|
+
|
|
7
|
+
Retrieves all open extensions for a resource
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 graph openextension list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-i, --resourceId <resourceId>`
|
|
19
|
+
: The Id of the resource for which to retrieve open extensions.
|
|
20
|
+
|
|
21
|
+
`-t, --resourceType <resourceType>`
|
|
22
|
+
: The type of resource. Allowed values are `user`, `group`, `device`, `organization`.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<Global />
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
Retrieve open extensions for a user specified by id
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 graph openextension list --resourceId eb77fbcf-6fe8-458b-985d-1747284793bc --resourceType user
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Retrieve open extensions for a user specified by UPN
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 graph openextension list --resourceId john.doe@contoso.com --resourceType user
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Retrieve open extensions for a group specified by id
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 graph openextension list --resourceId 19588303-70bf-44a4-beb1-e2f0f1ed06b3 --resourceType group
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Retrieve open extensions for an organization specified by id
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 graph openextension list --resourceId c956e711-f074-40c3-8431-fbd69bb67d9c --resourceType organization
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Response
|
|
54
|
+
|
|
55
|
+
<Tabs>
|
|
56
|
+
<TabItem value="JSON">
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
[
|
|
60
|
+
{
|
|
61
|
+
"extensionName": "com.contoso.roamingSettings",
|
|
62
|
+
"theme": "dark",
|
|
63
|
+
"color": "purple",
|
|
64
|
+
"lang": "Japanese",
|
|
65
|
+
"id": "com.contoso.roamingSettings"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"extensionName": "com.test.m365",
|
|
69
|
+
"settings": {
|
|
70
|
+
"theme": "dark"
|
|
71
|
+
},
|
|
72
|
+
"supportedSystem": "Linux",
|
|
73
|
+
"id": "com.test.m365"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
</TabItem>
|
|
79
|
+
<TabItem value="Text">
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
extensionName id
|
|
83
|
+
--------------------------- ---------------------------
|
|
84
|
+
com.contoso.roamingSettings com.contoso.roamingSettings
|
|
85
|
+
com.test.m365 com.test.m365
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
</TabItem>
|
|
89
|
+
<TabItem value="CSV">
|
|
90
|
+
|
|
91
|
+
```csv
|
|
92
|
+
extensionName,theme,color,lang,id
|
|
93
|
+
com.contoso.roamingSettings,dark,purple,Japanese,com.contoso.roamingSettings
|
|
94
|
+
com.test.m365,,,,com.test.m365
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
</TabItem>
|
|
98
|
+
<TabItem value="Markdown">
|
|
99
|
+
|
|
100
|
+
```md
|
|
101
|
+
# graph openextension list --resourceId "eb77fbcf-6fe8-458b-985d-1747284793bc" --resourceType "user"
|
|
102
|
+
|
|
103
|
+
Date: 3/29/2025
|
|
104
|
+
|
|
105
|
+
## com.contoso.roamingSettings
|
|
106
|
+
|
|
107
|
+
Property | Value
|
|
108
|
+
---------|-------
|
|
109
|
+
extensionName | com.contoso.roamingSettings
|
|
110
|
+
theme | dark
|
|
111
|
+
color | purple
|
|
112
|
+
lang | Japanese
|
|
113
|
+
id | com.contoso.roamingSettings
|
|
114
|
+
|
|
115
|
+
## com.test.m365
|
|
116
|
+
|
|
117
|
+
Property | Value
|
|
118
|
+
---------|-------
|
|
119
|
+
extensionName | com.test.m365
|
|
120
|
+
supportedSystem | Linux
|
|
121
|
+
id | com.test.m365
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
</TabItem>
|
|
125
|
+
</Tabs>
|
|
126
|
+
|
|
127
|
+
## More information
|
|
128
|
+
|
|
129
|
+
- Open extensions: https://learn.microsoft.com/graph/extensibility-overview?tabs=http#open-extensions
|