@knowttl/mg-axi 0.1.1 → 0.1.3
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/README.md +251 -77
- package/dist/api.js +253 -8
- package/dist/bin/mg-axi-hook.js +31 -0
- package/dist/catalogue.js +693 -2
- package/dist/cli.js +155 -17
- package/dist/docs.js +175 -46
- package/dist/doctor.js +2 -2
- package/dist/entra-access-reviews.js +11 -4
- package/dist/entra-apps.js +171 -14
- package/dist/entra-audit-logs.js +101 -16
- package/dist/entra-auth-methods.js +8 -4
- package/dist/entra-certificate-auth.js +12 -8
- package/dist/entra-conditional-access.js +425 -15
- package/dist/entra-contacts.js +19 -12
- package/dist/entra-contracts.js +7 -4
- package/dist/entra-custom-security-attributes.js +19 -12
- package/dist/entra-data-policy-operations.js +7 -4
- package/dist/entra-delegated-admin.js +55 -6
- package/dist/entra-deleted-items.js +6 -4
- package/dist/entra-directory-objects.js +6 -4
- package/dist/entra-directory.js +19 -12
- package/dist/entra-domains.js +13 -8
- package/dist/entra-entitlement-management.js +12 -4
- package/dist/entra-federation-configurations.js +7 -4
- package/dist/entra-grants.js +8 -4
- package/dist/entra-group-lifecycle.js +13 -8
- package/dist/entra-group-pim.js +431 -0
- package/dist/entra-groups.js +13 -8
- package/dist/entra-identity-providers.js +7 -4
- package/dist/entra-lifecycle-workflows.js +152 -13
- package/dist/entra-multi-tenant-organization.js +7 -4
- package/dist/entra-on-premises-synchronization.js +6 -4
- package/dist/entra-organization.js +13 -8
- package/dist/entra-risk-prevention.js +442 -0
- package/dist/entra-risk.js +224 -9
- package/dist/entra-roles.js +204 -12
- package/dist/entra-subscriptions.js +6 -4
- package/dist/entra-terms-of-use.js +13 -8
- package/dist/entra-users.js +7 -4
- package/dist/graph-session.js +30 -5
- package/dist/hook.js +84 -0
- package/dist/list-totals.js +52 -0
- package/dist/setup.js +9 -1
- package/docs/coverage.md +743 -610
- package/inventory/operations.json +2 -2
- package/inventory/schema.json +1 -1
- package/package.json +4 -3
- package/skills/mg-axi/SKILL.md +86 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { encode } from "@toon-format/toon";
|
|
2
|
-
import {
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { AxiError, installSessionStartHooks, runAxiCli } from "axi-sdk-js";
|
|
3
5
|
import { LEAVES, home, leafHelp, operationFor, resolveCommand, DESCRIPTION, TOP_LEVEL_HELP } from "./catalogue.js";
|
|
4
6
|
import { VERSION } from "./version.js";
|
|
5
7
|
import { Profiles } from "./profiles.js";
|
|
@@ -9,14 +11,15 @@ import { updateUserAccount } from "./entra-user-update.js";
|
|
|
9
11
|
import { revokeUserSessions } from "./entra-user-revoke-sessions.js";
|
|
10
12
|
import { createMutationCoordinator, mutationFetchTransport } from "./mutations.js";
|
|
11
13
|
import { TRANSITIVE_OPERATION, listGroupMemberOf, listGroupMembers, listGroups, showGroup } from "./entra-groups.js";
|
|
12
|
-
import { listDirectoryRoles, showDirectoryRole, listRoleAssignments, listPimEligible, listPimActive } from "./entra-roles.js";
|
|
14
|
+
import { listDirectoryRoles, showDirectoryRole, listDirectoryRoleTemplates, showDirectoryRoleTemplate, listRoleMembers, listScopedMembers, showScopedMember, listScopedRoleMemberships, showScopedRoleMembership, listRoleAssignments, listPimEligible, listPimActive } from "./entra-roles.js";
|
|
15
|
+
import { listGroupAssignmentSchedules, showGroupAssignmentSchedule, listGroupAssignmentInstances, showGroupAssignmentInstance, listGroupEligibilitySchedules, showGroupEligibilitySchedule, listGroupEligibilityInstances, showGroupEligibilityInstance, listGroupEligibilityRequests, showGroupEligibilityRequest } from "./entra-group-pim.js";
|
|
13
16
|
import { listAdministrativeUnitMembers, listAdministrativeUnits, listDevices, showAdministrativeUnit, showDevice } from "./entra-directory.js";
|
|
14
|
-
import { listSignIns, showSignIn, listDirectoryAudits, showDirectoryAudit } from "./entra-audit-logs.js";
|
|
15
|
-
import { listApplicationOwners, listApplications, listServicePrincipalOwners, listServicePrincipals, showApplication, showServicePrincipal } from "./entra-apps.js";
|
|
17
|
+
import { listSignIns, showSignIn, listDirectoryAudits, showDirectoryAudit, listProvisioning, showProvisioning } from "./entra-audit-logs.js";
|
|
18
|
+
import { listApplicationFederatedCredentials, listApplicationOwners, listApplications, listServicePrincipalAssignedTo, listServicePrincipalFederatedCredentials, listServicePrincipalOwners, listServicePrincipals, showApplication, showApplicationFederatedCredential, showServicePrincipal, showServicePrincipalAppRoleAssignment, showServicePrincipalAssignedTo, showServicePrincipalFederatedCredential } from "./entra-apps.js";
|
|
16
19
|
import { listAppRoleAssignments, listOAuth2Grants } from "./entra-grants.js";
|
|
17
|
-
import { listRiskyUsers, showRiskyUser, listRiskDetections, showRiskDetection } from "./entra-risk.js";
|
|
20
|
+
import { listRiskyUsers, showRiskyUser, listRiskDetections, showRiskDetection, listRiskyServicePrincipals, showRiskyServicePrincipal, listRiskyServicePrincipalHistory, showRiskyServicePrincipalHistory, listServicePrincipalRiskDetections, showServicePrincipalRiskDetection } from "./entra-risk.js";
|
|
18
21
|
import { dismissRiskyUser } from "./entra-risk-dismiss.js";
|
|
19
|
-
import { listPolicies, showPolicy, listNamedLocations, showNamedLocation } from "./entra-conditional-access.js";
|
|
22
|
+
import { listPolicies, showPolicy, listNamedLocations, showNamedLocation, listAuthStrengthPolicies, showAuthStrengthPolicy, listCombinationConfigurations, showCombinationConfiguration, listAuthMethodModes, showAuthMethodMode, listTemplates, showTemplate, listAuthContexts, showAuthContext, listDeletedPolicies, showDeletedPolicy, listDeletedNamedLocations, showDeletedNamedLocation } from "./entra-conditional-access.js";
|
|
20
23
|
import { listBrandingLocalizations, listOrganizations, showBranding, showBrandingLocalization, showOrganization } from "./entra-organization.js";
|
|
21
24
|
import { updateCaPolicy } from "./entra-ca-policy-update.js";
|
|
22
25
|
import { listDomains, showDomain, listVerificationDnsRecords, showVerificationDnsRecord, listServiceConfigurationRecords, showServiceConfigurationRecord, listDomainDnsRecords, showDomainDnsRecord } from "./entra-domains.js";
|
|
@@ -28,7 +31,7 @@ import { listDirectoryObjects, showDirectoryObject, countDirectoryObjects } from
|
|
|
28
31
|
import { listDeletedItems, showDeletedItem, countDeletedItems } from "./entra-deleted-items.js";
|
|
29
32
|
import { listContacts, showContact, countContacts, showContactManager, listContactDirectReports, showContactDirectReport, countContactDirectReports, castDirectReports, listContactMemberOf, showContactMemberOf, countContactMemberOf, transitMembership, castMembership } from "./entra-contacts.js";
|
|
30
33
|
import { countContracts, listContracts, showContract } from "./entra-contracts.js";
|
|
31
|
-
import { listDelegatedAdminCustomers, showDelegatedAdminCustomer, listDelegatedAdminRelationships, showDelegatedAdminRelationship, listDelegatedAdminAccessAssignments, showDelegatedAdminAccessAssignment, listDelegatedAdminOperations, showDelegatedAdminOperation, listDelegatedAdminRequests, showDelegatedAdminRequest, listDelegatedAdminServiceManagementDetails, showDelegatedAdminServiceManagementDetail } from "./entra-delegated-admin.js";
|
|
34
|
+
import { listDelegatedAdminCustomers, showDelegatedAdminCustomer, listDelegatedAdminRelationships, showDelegatedAdminRelationship, listDelegatedAdminAccessAssignments, showDelegatedAdminAccessAssignment, listDelegatedAdminOperations, showDelegatedAdminOperation, listDelegatedAdminRequests, showDelegatedAdminRequest, listDelegatedAdminServiceManagementDetails, showDelegatedAdminServiceManagementDetail, countDelegatedAdminCustomers, countDelegatedAdminServiceManagementDetails, countDelegatedAdminRelationships, countDelegatedAdminAccessAssignments, countDelegatedAdminOperations, countDelegatedAdminRequests } from "./entra-delegated-admin.js";
|
|
32
35
|
import { listMultiTenantOrganizationTenants, showMultiTenantOrganization, showMultiTenantOrganizationJoinRequest, countMultiTenantOrganizationTenants } from "./entra-multi-tenant-organization.js";
|
|
33
36
|
import { showTenantInformation } from "./entra-tenant-information.js";
|
|
34
37
|
import { countLifecyclePolicies, listLifecyclePolicies, showLifecyclePolicy, countSettingTemplates, listSettingTemplates, showSettingTemplate } from "./entra-group-lifecycle.js";
|
|
@@ -36,9 +39,10 @@ import { listAttributeSets, showAttributeSet, countAttributeSets, listCustomSecu
|
|
|
36
39
|
import { listIdentityProviders, showIdentityProvider, countIdentityProviders, availableIdentityProviderTypes } from "./entra-identity-providers.js";
|
|
37
40
|
import { listFederationConfigurations, showFederationConfiguration, countFederationConfigurations, availableFederationProviderTypes } from "./entra-federation-configurations.js";
|
|
38
41
|
import { listDataPolicyOperations, showDataPolicyOperation, countDataPolicyOperations } from "./entra-data-policy-operations.js";
|
|
42
|
+
import { listFraudProtectionProviders, showFraudProtectionProvider, countFraudProtectionProviders, listWafProviders, showWafProvider, countWafProviders, listWafVerifications, showWafVerification, countWafVerifications, showVerificationProvider } from "./entra-risk-prevention.js";
|
|
39
43
|
import { listDefinitions, showDefinition, listInstances, showInstance, listDecisions, showDecision, listContactedReviewers, showContactedReviewer, listStages, showStage } from "./entra-access-reviews.js";
|
|
40
44
|
import { listCatalogs, showCatalog, countCatalogs, listAccessPackages, showAccessPackage, countAccessPackages, listAssignmentPolicies, showAssignmentPolicy, countAssignmentPolicies, listResourceRoleScopes, showResourceRoleScope, countResourceRoleScopes, listAssignments, showAssignment, countAssignments, listAssignmentRequests, showAssignmentRequest, countAssignmentRequests } from "./entra-entitlement-management.js";
|
|
41
|
-
import { listWorkflows, showWorkflow, countWorkflows, listWorkflowTemplates, showWorkflowTemplate, countWorkflowTemplates, listTaskDefinitions, showTaskDefinition, countTaskDefinitions, showLifecycleSettings, listRuns, showRun, countRuns, listUserProcessingResults, showUserProcessingResult, countUserProcessingResults, listSubjectProcessingResults, showSubjectProcessingResult, countSubjectProcessingResults, listTaskReports, showTaskReport, countTaskReports, showTaskReportTask, showTaskReportTaskDefinition } from "./entra-lifecycle-workflows.js";
|
|
45
|
+
import { listWorkflows, showWorkflow, countWorkflows, listWorkflowTemplates, showWorkflowTemplate, countWorkflowTemplates, listTaskDefinitions, showTaskDefinition, countTaskDefinitions, showLifecycleSettings, listRuns, showRun, countRuns, listUserProcessingResults, showUserProcessingResult, countUserProcessingResults, listSubjectProcessingResults, showSubjectProcessingResult, countSubjectProcessingResults, listTaskReports, showTaskReport, countTaskReports, showTaskReportTask, showTaskReportTaskDefinition, listRunUserProcessingResults, showRunUserProcessingResult, countRunUserProcessingResults, listRunSubjectProcessingResults, showRunSubjectProcessingResult, countRunSubjectProcessingResults, listRunTaskProcessingResults, showRunTaskProcessingResult, countRunTaskProcessingResults } from "./entra-lifecycle-workflows.js";
|
|
42
46
|
import { listAuthenticationMethods, listRegistrationDetails } from "./entra-auth-methods.js";
|
|
43
47
|
import { addGroupMember } from "./entra-group-member-add.js";
|
|
44
48
|
import { fetchTransport } from "./api.js";
|
|
@@ -62,6 +66,36 @@ function localHome(name) {
|
|
|
62
66
|
output.help.unshift("npx -y @knowttl/mg-axi profile list", "npx -y @knowttl/mg-axi login --help");
|
|
63
67
|
return output;
|
|
64
68
|
}
|
|
69
|
+
// One dispatch for the hook installer: resolve the sibling hook entry point
|
|
70
|
+
// installed next to this binary and register it as the SessionStart command
|
|
71
|
+
// for Claude Code, Codex and OpenCode through the SDK. No config, profile,
|
|
72
|
+
// transport or network is involved; the hook itself prints the local-only
|
|
73
|
+
// summary from src/hook.ts. Install failures throw loudly; hook failures
|
|
74
|
+
// never do.
|
|
75
|
+
function runSetupHooks() {
|
|
76
|
+
const hookPath = join(dirname(process.argv[1] ?? ""), "mg-axi-hook.js");
|
|
77
|
+
if (!existsSync(hookPath)) {
|
|
78
|
+
throw new AxiError("Cannot locate the mg-axi-hook entry point", "HOOK_INSTALL_FAILED", [
|
|
79
|
+
"Reinstall @knowttl/mg-axi so dist/bin/mg-axi-hook.js sits next to the main entry point",
|
|
80
|
+
"Run mg-axi setup hooks again after reinstalling",
|
|
81
|
+
]);
|
|
82
|
+
}
|
|
83
|
+
const failures = [];
|
|
84
|
+
installSessionStartHooks({
|
|
85
|
+
marker: "mg-axi-hook",
|
|
86
|
+
execPath: hookPath,
|
|
87
|
+
binaryNames: ["mg-axi-hook"],
|
|
88
|
+
distEntrypoints: ["dist/bin/mg-axi-hook.js"],
|
|
89
|
+
onError: (message) => { failures.push(message); },
|
|
90
|
+
});
|
|
91
|
+
if (failures.length > 0) {
|
|
92
|
+
throw new AxiError("Failed to install mg-axi agent hooks", "HOOK_INSTALL_FAILED", failures);
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
hooks: { status: "installed", integrations: "Claude Code, Codex, OpenCode" },
|
|
96
|
+
help: ["Restart your agent session to receive mg-axi ambient context"],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
65
99
|
async function readCursor(cursor) {
|
|
66
100
|
if (cursor !== "-")
|
|
67
101
|
return cursor;
|
|
@@ -98,6 +132,8 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
98
132
|
return profiles.resolve(flags.profile);
|
|
99
133
|
if (leaf.path === "setup")
|
|
100
134
|
return setupView(profiles);
|
|
135
|
+
if (leaf.path === "setup hooks")
|
|
136
|
+
return runSetupHooks();
|
|
101
137
|
if (leaf.path === "doctor") {
|
|
102
138
|
const names = doctorTargets(profiles, flags.profile);
|
|
103
139
|
let delegated = overrides.delegated;
|
|
@@ -128,7 +164,7 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
128
164
|
const { MsalProvider } = await import("./msal-provider.js");
|
|
129
165
|
return { profile: selected.name, ...await new DelegatedAuth(new MsalProvider()).login(selected.profile, String(flags.method ?? "browser"), String(flags.scopes).split(",")) };
|
|
130
166
|
}
|
|
131
|
-
if (leaf.path === "entra conditional-access policy list" || leaf.path === "entra conditional-access policy show" || leaf.path === "entra conditional-access named-location list" || leaf.path === "entra conditional-access named-location show") {
|
|
167
|
+
if (leaf.path === "entra conditional-access policy list" || leaf.path === "entra conditional-access policy show" || leaf.path === "entra conditional-access named-location list" || leaf.path === "entra conditional-access named-location show" || leaf.path === "entra conditional-access auth-strength-policy list" || leaf.path === "entra conditional-access auth-strength-policy show" || leaf.path === "entra conditional-access combination-configuration list" || leaf.path === "entra conditional-access combination-configuration show" || leaf.path === "entra conditional-access auth-method-mode list" || leaf.path === "entra conditional-access auth-method-mode show" || leaf.path === "entra conditional-access template list" || leaf.path === "entra conditional-access template show" || leaf.path === "entra conditional-access auth-context list" || leaf.path === "entra conditional-access auth-context show" || leaf.path === "entra conditional-access deleted-policy list" || leaf.path === "entra conditional-access deleted-policy show" || leaf.path === "entra conditional-access deleted-named-location list" || leaf.path === "entra conditional-access deleted-named-location show") {
|
|
132
168
|
const selected = profiles.resolve(flags.profile);
|
|
133
169
|
const operation = operationFor(leaf, String(flags["api-version"] ?? "v1.0"));
|
|
134
170
|
if (!operation || operation.method !== "GET") {
|
|
@@ -154,7 +190,21 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
154
190
|
case "entra conditional-access policy list": return listPolicies(session, flags, selected.profile, operation, help, selected.name);
|
|
155
191
|
case "entra conditional-access policy show": return showPolicy(session, flags, selected.profile, operation, help, selected.name);
|
|
156
192
|
case "entra conditional-access named-location list": return listNamedLocations(session, flags, selected.profile, operation, help, selected.name);
|
|
157
|
-
|
|
193
|
+
case "entra conditional-access named-location show": return showNamedLocation(session, flags, selected.profile, operation, help, selected.name);
|
|
194
|
+
case "entra conditional-access auth-strength-policy list": return listAuthStrengthPolicies(session, flags, selected.profile, operation, help, selected.name);
|
|
195
|
+
case "entra conditional-access auth-strength-policy show": return showAuthStrengthPolicy(session, flags, selected.profile, operation, help, selected.name);
|
|
196
|
+
case "entra conditional-access combination-configuration list": return listCombinationConfigurations(session, flags, selected.profile, operation, help, selected.name);
|
|
197
|
+
case "entra conditional-access combination-configuration show": return showCombinationConfiguration(session, flags, selected.profile, operation, help, selected.name);
|
|
198
|
+
case "entra conditional-access auth-method-mode list": return listAuthMethodModes(session, flags, selected.profile, operation, help, selected.name);
|
|
199
|
+
case "entra conditional-access auth-method-mode show": return showAuthMethodMode(session, flags, selected.profile, operation, help, selected.name);
|
|
200
|
+
case "entra conditional-access template list": return listTemplates(session, flags, selected.profile, operation, help, selected.name);
|
|
201
|
+
case "entra conditional-access auth-context list": return listAuthContexts(session, flags, selected.profile, operation, help, selected.name);
|
|
202
|
+
case "entra conditional-access auth-context show": return showAuthContext(session, flags, selected.profile, operation, help, selected.name);
|
|
203
|
+
case "entra conditional-access deleted-policy list": return listDeletedPolicies(session, flags, selected.profile, operation, help, selected.name);
|
|
204
|
+
case "entra conditional-access deleted-policy show": return showDeletedPolicy(session, flags, selected.profile, operation, help, selected.name);
|
|
205
|
+
case "entra conditional-access deleted-named-location list": return listDeletedNamedLocations(session, flags, selected.profile, operation, help, selected.name);
|
|
206
|
+
case "entra conditional-access deleted-named-location show": return showDeletedNamedLocation(session, flags, selected.profile, operation, help, selected.name);
|
|
207
|
+
default: return showTemplate(session, flags, selected.profile, operation, help, selected.name);
|
|
158
208
|
}
|
|
159
209
|
}
|
|
160
210
|
if (leaf.path === "entra access-review definition list" || leaf.path === "entra access-review definition show" || leaf.path === "entra access-review instance list" || leaf.path === "entra access-review instance show" || leaf.path === "entra access-review decision list" || leaf.path === "entra access-review decision show" || leaf.path === "entra access-review contacted-reviewer list" || leaf.path === "entra access-review contacted-reviewer show" || leaf.path === "entra access-review stage list" || leaf.path === "entra access-review stage show") {
|
|
@@ -238,7 +288,7 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
238
288
|
default: return countResourceRoleScopes(session, flags, selected.profile, operation, help, selected.name);
|
|
239
289
|
}
|
|
240
290
|
}
|
|
241
|
-
if (leaf.path === "entra lifecycle workflow list" || leaf.path === "entra lifecycle workflow show" || leaf.path === "entra lifecycle workflow count" || leaf.path === "entra lifecycle workflow-template list" || leaf.path === "entra lifecycle workflow-template show" || leaf.path === "entra lifecycle workflow-template count" || leaf.path === "entra lifecycle task-definition list" || leaf.path === "entra lifecycle task-definition show" || leaf.path === "entra lifecycle task-definition count" || leaf.path === "entra lifecycle settings show" || leaf.path === "entra lifecycle run list" || leaf.path === "entra lifecycle run show" || leaf.path === "entra lifecycle run count" || leaf.path === "entra lifecycle user-processing-result list" || leaf.path === "entra lifecycle user-processing-result show" || leaf.path === "entra lifecycle user-processing-result count" || leaf.path === "entra lifecycle subject-processing-result list" || leaf.path === "entra lifecycle subject-processing-result show" || leaf.path === "entra lifecycle subject-processing-result count" || leaf.path === "entra lifecycle task-report list" || leaf.path === "entra lifecycle task-report show" || leaf.path === "entra lifecycle task-report count" || leaf.path === "entra lifecycle task-report task show" || leaf.path === "entra lifecycle task-report task-definition show") {
|
|
291
|
+
if (leaf.path === "entra lifecycle workflow list" || leaf.path === "entra lifecycle workflow show" || leaf.path === "entra lifecycle workflow count" || leaf.path === "entra lifecycle workflow-template list" || leaf.path === "entra lifecycle workflow-template show" || leaf.path === "entra lifecycle workflow-template count" || leaf.path === "entra lifecycle task-definition list" || leaf.path === "entra lifecycle task-definition show" || leaf.path === "entra lifecycle task-definition count" || leaf.path === "entra lifecycle settings show" || leaf.path === "entra lifecycle run list" || leaf.path === "entra lifecycle run show" || leaf.path === "entra lifecycle run count" || leaf.path === "entra lifecycle user-processing-result list" || leaf.path === "entra lifecycle user-processing-result show" || leaf.path === "entra lifecycle user-processing-result count" || leaf.path === "entra lifecycle subject-processing-result list" || leaf.path === "entra lifecycle subject-processing-result show" || leaf.path === "entra lifecycle subject-processing-result count" || leaf.path === "entra lifecycle task-report list" || leaf.path === "entra lifecycle task-report show" || leaf.path === "entra lifecycle task-report count" || leaf.path === "entra lifecycle task-report task show" || leaf.path === "entra lifecycle task-report task-definition show" || leaf.path === "entra lifecycle run user-processing-result list" || leaf.path === "entra lifecycle run user-processing-result show" || leaf.path === "entra lifecycle run user-processing-result count" || leaf.path === "entra lifecycle run subject-processing-result list" || leaf.path === "entra lifecycle run subject-processing-result show" || leaf.path === "entra lifecycle run subject-processing-result count" || leaf.path === "entra lifecycle run task-processing-result list" || leaf.path === "entra lifecycle run task-processing-result show" || leaf.path === "entra lifecycle run task-processing-result count") {
|
|
242
292
|
if (String(flags["api-version"] ?? "v1.0") !== "v1.0") {
|
|
243
293
|
throw new AxiError("Lifecycle-workflow reads support v1.0 only; beta needs its own review", "VALIDATION_ERROR", [leafHelp(leaf)]);
|
|
244
294
|
}
|
|
@@ -287,6 +337,15 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
287
337
|
case "entra lifecycle task-report count": return countTaskReports(session, flags, selected.profile, operation, help, selected.name);
|
|
288
338
|
case "entra lifecycle task-report task show": return showTaskReportTask(session, flags, selected.profile, operation, help, selected.name);
|
|
289
339
|
case "entra lifecycle task-report task-definition show": return showTaskReportTaskDefinition(session, flags, selected.profile, operation, help, selected.name);
|
|
340
|
+
case "entra lifecycle run user-processing-result list": return listRunUserProcessingResults(session, flags, selected.profile, operation, help, selected.name);
|
|
341
|
+
case "entra lifecycle run user-processing-result show": return showRunUserProcessingResult(session, flags, selected.profile, operation, help, selected.name);
|
|
342
|
+
case "entra lifecycle run user-processing-result count": return countRunUserProcessingResults(session, flags, selected.profile, operation, help, selected.name);
|
|
343
|
+
case "entra lifecycle run subject-processing-result list": return listRunSubjectProcessingResults(session, flags, selected.profile, operation, help, selected.name);
|
|
344
|
+
case "entra lifecycle run subject-processing-result show": return showRunSubjectProcessingResult(session, flags, selected.profile, operation, help, selected.name);
|
|
345
|
+
case "entra lifecycle run subject-processing-result count": return countRunSubjectProcessingResults(session, flags, selected.profile, operation, help, selected.name);
|
|
346
|
+
case "entra lifecycle run task-processing-result list": return listRunTaskProcessingResults(session, flags, selected.profile, operation, help, selected.name);
|
|
347
|
+
case "entra lifecycle run task-processing-result show": return showRunTaskProcessingResult(session, flags, selected.profile, operation, help, selected.name);
|
|
348
|
+
case "entra lifecycle run task-processing-result count": return countRunTaskProcessingResults(session, flags, selected.profile, operation, help, selected.name);
|
|
290
349
|
default: return showLifecycleSettings(session, flags, selected.profile, operation, help, selected.name);
|
|
291
350
|
}
|
|
292
351
|
}
|
|
@@ -540,7 +599,12 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
540
599
|
help: leafHelp(leaf),
|
|
541
600
|
});
|
|
542
601
|
}
|
|
543
|
-
if (leaf.path === "entra directory-role list" || leaf.path === "entra directory-role show" || leaf.path === "entra role-assignment list" || leaf.path === "entra pim eligible list" || leaf.path === "entra pim active list"
|
|
602
|
+
if (leaf.path === "entra directory-role list" || leaf.path === "entra directory-role show" || leaf.path === "entra directory-role-template list" || leaf.path === "entra directory-role-template show" || leaf.path === "entra directory-role member list" || leaf.path === "entra directory-role scoped-member list" || leaf.path === "entra directory-role scoped-member show" || leaf.path === "entra scoped-role-membership list" || leaf.path === "entra scoped-role-membership show" || leaf.path === "entra role-assignment list" || leaf.path === "entra pim eligible list" || leaf.path === "entra pim active list"
|
|
603
|
+
|| leaf.path === "entra pim group-assignment-schedule list" || leaf.path === "entra pim group-assignment-schedule show"
|
|
604
|
+
|| leaf.path === "entra pim group-assignment-instance list" || leaf.path === "entra pim group-assignment-instance show"
|
|
605
|
+
|| leaf.path === "entra pim group-eligibility-schedule list" || leaf.path === "entra pim group-eligibility-schedule show"
|
|
606
|
+
|| leaf.path === "entra pim group-eligibility-instance list" || leaf.path === "entra pim group-eligibility-instance show"
|
|
607
|
+
|| leaf.path === "entra pim group-eligibility-request list" || leaf.path === "entra pim group-eligibility-request show"
|
|
544
608
|
|| leaf.path === "entra device list" || leaf.path === "entra device show"
|
|
545
609
|
|| leaf.path === "entra administrative-unit list" || leaf.path === "entra administrative-unit show"
|
|
546
610
|
|| leaf.path === "entra administrative-unit member list") {
|
|
@@ -566,9 +630,26 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
566
630
|
switch (leaf.path) {
|
|
567
631
|
case "entra directory-role list": return listDirectoryRoles(session, flags, selected.profile, operation, help, selected.name);
|
|
568
632
|
case "entra directory-role show": return showDirectoryRole(session, flags, selected.profile, operation, help, selected.name);
|
|
633
|
+
case "entra directory-role-template list": return listDirectoryRoleTemplates(session, flags, selected.profile, operation, help, selected.name);
|
|
634
|
+
case "entra directory-role-template show": return showDirectoryRoleTemplate(session, flags, selected.profile, operation, help, selected.name);
|
|
635
|
+
case "entra directory-role member list": return listRoleMembers(session, flags, selected.profile, operation, help, selected.name);
|
|
636
|
+
case "entra directory-role scoped-member list": return listScopedMembers(session, flags, selected.profile, operation, help, selected.name);
|
|
637
|
+
case "entra directory-role scoped-member show": return showScopedMember(session, flags, selected.profile, operation, help, selected.name);
|
|
638
|
+
case "entra scoped-role-membership list": return listScopedRoleMemberships(session, flags, selected.profile, operation, help, selected.name);
|
|
639
|
+
case "entra scoped-role-membership show": return showScopedRoleMembership(session, flags, selected.profile, operation, help, selected.name);
|
|
569
640
|
case "entra role-assignment list": return listRoleAssignments(session, flags, selected.profile, operation, help, selected.name);
|
|
570
641
|
case "entra pim eligible list": return listPimEligible(session, flags, selected.profile, operation, help, selected.name);
|
|
571
642
|
case "entra pim active list": return listPimActive(session, flags, selected.profile, operation, help, selected.name);
|
|
643
|
+
case "entra pim group-assignment-schedule list": return listGroupAssignmentSchedules(session, flags, selected.profile, operation, help, selected.name);
|
|
644
|
+
case "entra pim group-assignment-schedule show": return showGroupAssignmentSchedule(session, flags, selected.profile, operation, help, selected.name);
|
|
645
|
+
case "entra pim group-assignment-instance list": return listGroupAssignmentInstances(session, flags, selected.profile, operation, help, selected.name);
|
|
646
|
+
case "entra pim group-assignment-instance show": return showGroupAssignmentInstance(session, flags, selected.profile, operation, help, selected.name);
|
|
647
|
+
case "entra pim group-eligibility-schedule list": return listGroupEligibilitySchedules(session, flags, selected.profile, operation, help, selected.name);
|
|
648
|
+
case "entra pim group-eligibility-schedule show": return showGroupEligibilitySchedule(session, flags, selected.profile, operation, help, selected.name);
|
|
649
|
+
case "entra pim group-eligibility-instance list": return listGroupEligibilityInstances(session, flags, selected.profile, operation, help, selected.name);
|
|
650
|
+
case "entra pim group-eligibility-instance show": return showGroupEligibilityInstance(session, flags, selected.profile, operation, help, selected.name);
|
|
651
|
+
case "entra pim group-eligibility-request list": return listGroupEligibilityRequests(session, flags, selected.profile, operation, help, selected.name);
|
|
652
|
+
case "entra pim group-eligibility-request show": return showGroupEligibilityRequest(session, flags, selected.profile, operation, help, selected.name);
|
|
572
653
|
case "entra device list": return listDevices(session, flags, selected.profile, operation, help, selected.name);
|
|
573
654
|
case "entra device show": return showDevice(session, flags, selected.profile, operation, help, selected.name);
|
|
574
655
|
case "entra administrative-unit list": return listAdministrativeUnits(session, flags, selected.profile, operation, help, selected.name);
|
|
@@ -606,13 +687,13 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
606
687
|
default: return showBrandingLocalization(session, flags, selected.profile, operation, help, selected.name);
|
|
607
688
|
}
|
|
608
689
|
}
|
|
609
|
-
if (leaf.path === "entra sign-in list" || leaf.path === "entra sign-in show" || leaf.path === "entra directory-audit list" || leaf.path === "entra directory-audit show" || leaf.path === "entra application list" || leaf.path === "entra application show" || leaf.path === "entra service-principal list" || leaf.path === "entra service-principal show" || leaf.path === "entra application owner list" || leaf.path === "entra service-principal owner list") {
|
|
690
|
+
if (leaf.path === "entra sign-in list" || leaf.path === "entra sign-in show" || leaf.path === "entra directory-audit list" || leaf.path === "entra directory-audit show" || leaf.path === "entra provisioning list" || leaf.path === "entra provisioning show" || leaf.path === "entra application list" || leaf.path === "entra application show" || leaf.path === "entra service-principal list" || leaf.path === "entra service-principal show" || leaf.path === "entra application owner list" || leaf.path === "entra service-principal owner list" || leaf.path === "entra application federated-credential list" || leaf.path === "entra application federated-credential show" || leaf.path === "entra service-principal federated-credential list" || leaf.path === "entra service-principal federated-credential show" || leaf.path === "entra service-principal app-role-assigned-to list" || leaf.path === "entra service-principal app-role-assigned-to show" || leaf.path === "entra service-principal app-role-assignment show") {
|
|
610
691
|
const selected = profiles.resolve(flags.profile);
|
|
611
692
|
const operation = operationFor(leaf, String(flags["api-version"] ?? "v1.0"));
|
|
612
693
|
if (!operation || operation.method !== "GET") {
|
|
613
694
|
throw new AxiError(`Unknown catalogued Graph operation for ${leaf.path}`, "VALIDATION_ERROR", [leafHelp(leaf)]);
|
|
614
695
|
}
|
|
615
|
-
if ((leaf.path.startsWith("entra sign-in ") || leaf.path.startsWith("entra directory-audit ")) && flags.cursor !== undefined)
|
|
696
|
+
if ((leaf.path.startsWith("entra sign-in ") || leaf.path.startsWith("entra directory-audit ") || leaf.path.startsWith("entra provisioning ")) && flags.cursor !== undefined)
|
|
616
697
|
flags.cursor = (await readCursor(String(flags.cursor)));
|
|
617
698
|
let delegated = overrides.delegated;
|
|
618
699
|
let application = overrides.application;
|
|
@@ -633,11 +714,20 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
633
714
|
case "entra sign-in show": return showSignIn(session, flags, selected.profile, operation, help, selected.name);
|
|
634
715
|
case "entra directory-audit list": return listDirectoryAudits(session, flags, selected.profile, operation, help, selected.name);
|
|
635
716
|
case "entra directory-audit show": return showDirectoryAudit(session, flags, selected.profile, operation, help, selected.name);
|
|
717
|
+
case "entra provisioning list": return listProvisioning(session, flags, selected.profile, operation, help, selected.name);
|
|
718
|
+
case "entra provisioning show": return showProvisioning(session, flags, selected.profile, operation, help, selected.name);
|
|
636
719
|
case "entra application list": return listApplications(session, flags, selected.profile, operation, help, selected.name);
|
|
637
720
|
case "entra application show": return showApplication(session, flags, selected.profile, operation, help, selected.name);
|
|
638
721
|
case "entra service-principal list": return listServicePrincipals(session, flags, selected.profile, operation, help, selected.name);
|
|
639
722
|
case "entra service-principal show": return showServicePrincipal(session, flags, selected.profile, operation, help, selected.name);
|
|
640
723
|
case "entra application owner list": return listApplicationOwners(session, flags, selected.profile, operation, help, selected.name);
|
|
724
|
+
case "entra application federated-credential list": return listApplicationFederatedCredentials(session, flags, selected.profile, operation, help, selected.name);
|
|
725
|
+
case "entra application federated-credential show": return showApplicationFederatedCredential(session, flags, selected.profile, operation, help, selected.name);
|
|
726
|
+
case "entra service-principal federated-credential list": return listServicePrincipalFederatedCredentials(session, flags, selected.profile, operation, help, selected.name);
|
|
727
|
+
case "entra service-principal federated-credential show": return showServicePrincipalFederatedCredential(session, flags, selected.profile, operation, help, selected.name);
|
|
728
|
+
case "entra service-principal app-role-assigned-to list": return listServicePrincipalAssignedTo(session, flags, selected.profile, operation, help, selected.name);
|
|
729
|
+
case "entra service-principal app-role-assigned-to show": return showServicePrincipalAssignedTo(session, flags, selected.profile, operation, help, selected.name);
|
|
730
|
+
case "entra service-principal app-role-assignment show": return showServicePrincipalAppRoleAssignment(session, flags, selected.profile, operation, help, selected.name);
|
|
641
731
|
default: return listServicePrincipalOwners(session, flags, selected.profile, operation, help, selected.name);
|
|
642
732
|
}
|
|
643
733
|
}
|
|
@@ -702,7 +792,7 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
702
792
|
help: leafHelp(leaf),
|
|
703
793
|
});
|
|
704
794
|
}
|
|
705
|
-
if (leaf.path === "entra risky-user list" || leaf.path === "entra risky-user show" || leaf.path === "entra risk-detection list" || leaf.path === "entra risk-detection show") {
|
|
795
|
+
if (leaf.path === "entra risky-user list" || leaf.path === "entra risky-user show" || leaf.path === "entra risk-detection list" || leaf.path === "entra risk-detection show" || leaf.path === "entra risky-service-principal list" || leaf.path === "entra risky-service-principal show" || leaf.path === "entra risky-service-principal history list" || leaf.path === "entra risky-service-principal history show" || leaf.path === "entra service-principal-risk-detection list" || leaf.path === "entra service-principal-risk-detection show") {
|
|
706
796
|
const selected = profiles.resolve(flags.profile);
|
|
707
797
|
const operation = operationFor(leaf, String(flags["api-version"] ?? "v1.0"));
|
|
708
798
|
if (!operation || operation.method !== "GET") {
|
|
@@ -728,7 +818,13 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
728
818
|
case "entra risky-user list": return listRiskyUsers(session, flags, selected.profile, operation, help, selected.name);
|
|
729
819
|
case "entra risky-user show": return showRiskyUser(session, flags, selected.profile, operation, help, selected.name);
|
|
730
820
|
case "entra risk-detection list": return listRiskDetections(session, flags, selected.profile, operation, help, selected.name);
|
|
731
|
-
|
|
821
|
+
case "entra risk-detection show": return showRiskDetection(session, flags, selected.profile, operation, help, selected.name);
|
|
822
|
+
case "entra risky-service-principal list": return listRiskyServicePrincipals(session, flags, selected.profile, operation, help, selected.name);
|
|
823
|
+
case "entra risky-service-principal show": return showRiskyServicePrincipal(session, flags, selected.profile, operation, help, selected.name);
|
|
824
|
+
case "entra risky-service-principal history list": return listRiskyServicePrincipalHistory(session, flags, selected.profile, operation, help, selected.name);
|
|
825
|
+
case "entra risky-service-principal history show": return showRiskyServicePrincipalHistory(session, flags, selected.profile, operation, help, selected.name);
|
|
826
|
+
case "entra service-principal-risk-detection list": return listServicePrincipalRiskDetections(session, flags, selected.profile, operation, help, selected.name);
|
|
827
|
+
default: return showServicePrincipalRiskDetection(session, flags, selected.profile, operation, help, selected.name);
|
|
732
828
|
}
|
|
733
829
|
}
|
|
734
830
|
if (leaf.path === "entra domain list" || leaf.path === "entra domain show"
|
|
@@ -1106,7 +1202,7 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
1106
1202
|
default: return countContracts(session, flags, selected.profile, operation, help, selected.name);
|
|
1107
1203
|
}
|
|
1108
1204
|
}
|
|
1109
|
-
if (leaf.path === "entra delegated-admin-customer list" || leaf.path === "entra delegated-admin-customer show" || leaf.path === "entra delegated-admin-relationship list" || leaf.path === "entra delegated-admin-relationship show" || leaf.path === "entra delegated-admin-relationship list-access-assignments" || leaf.path === "entra delegated-admin-relationship show-access-assignment" || leaf.path === "entra delegated-admin-relationship list-operations" || leaf.path === "entra delegated-admin-relationship show-operation" || leaf.path === "entra delegated-admin-relationship list-requests" || leaf.path === "entra delegated-admin-relationship show-request" || leaf.path === "entra delegated-admin-customer list-service-management-details" || leaf.path === "entra delegated-admin-customer show-service-management-detail") {
|
|
1205
|
+
if (leaf.path === "entra delegated-admin-customer list" || leaf.path === "entra delegated-admin-customer show" || leaf.path === "entra delegated-admin-relationship list" || leaf.path === "entra delegated-admin-relationship show" || leaf.path === "entra delegated-admin-relationship list-access-assignments" || leaf.path === "entra delegated-admin-relationship show-access-assignment" || leaf.path === "entra delegated-admin-relationship list-operations" || leaf.path === "entra delegated-admin-relationship show-operation" || leaf.path === "entra delegated-admin-relationship list-requests" || leaf.path === "entra delegated-admin-relationship show-request" || leaf.path === "entra delegated-admin-customer list-service-management-details" || leaf.path === "entra delegated-admin-customer show-service-management-detail" || leaf.path === "entra delegated-admin-customer count" || leaf.path === "entra delegated-admin-customer count-service-management-details" || leaf.path === "entra delegated-admin-relationship count" || leaf.path === "entra delegated-admin-relationship count-access-assignments" || leaf.path === "entra delegated-admin-relationship count-operations" || leaf.path === "entra delegated-admin-relationship count-requests") {
|
|
1110
1206
|
if (String(flags["api-version"] ?? "v1.0") !== "v1.0") {
|
|
1111
1207
|
throw new AxiError("Delegated-admin reads support v1.0 only; beta needs its own review", "VALIDATION_ERROR", [leafHelp(leaf)]);
|
|
1112
1208
|
}
|
|
@@ -1141,6 +1237,12 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
1141
1237
|
case "entra delegated-admin-relationship list-requests": return listDelegatedAdminRequests(session, flags, selected.profile, operation, help, selected.name);
|
|
1142
1238
|
case "entra delegated-admin-relationship show-request": return showDelegatedAdminRequest(session, flags, selected.profile, operation, help, selected.name);
|
|
1143
1239
|
case "entra delegated-admin-customer list-service-management-details": return listDelegatedAdminServiceManagementDetails(session, flags, selected.profile, operation, help, selected.name);
|
|
1240
|
+
case "entra delegated-admin-customer count": return countDelegatedAdminCustomers(session, flags, selected.profile, operation, help, selected.name);
|
|
1241
|
+
case "entra delegated-admin-customer count-service-management-details": return countDelegatedAdminServiceManagementDetails(session, flags, selected.profile, operation, help, selected.name);
|
|
1242
|
+
case "entra delegated-admin-relationship count": return countDelegatedAdminRelationships(session, flags, selected.profile, operation, help, selected.name);
|
|
1243
|
+
case "entra delegated-admin-relationship count-access-assignments": return countDelegatedAdminAccessAssignments(session, flags, selected.profile, operation, help, selected.name);
|
|
1244
|
+
case "entra delegated-admin-relationship count-operations": return countDelegatedAdminOperations(session, flags, selected.profile, operation, help, selected.name);
|
|
1245
|
+
case "entra delegated-admin-relationship count-requests": return countDelegatedAdminRequests(session, flags, selected.profile, operation, help, selected.name);
|
|
1144
1246
|
default: return showDelegatedAdminServiceManagementDetail(session, flags, selected.profile, operation, help, selected.name);
|
|
1145
1247
|
}
|
|
1146
1248
|
}
|
|
@@ -1288,6 +1390,42 @@ export async function executeArgv(argv, overrides = {}) {
|
|
|
1288
1390
|
default: return countDataPolicyOperations(session, flags, selected.profile, operation, help, selected.name);
|
|
1289
1391
|
}
|
|
1290
1392
|
}
|
|
1393
|
+
if (leaf.path === "entra fraud-protection-provider list" || leaf.path === "entra fraud-protection-provider show" || leaf.path === "entra fraud-protection-provider count" || leaf.path === "entra web-application-firewall-provider list" || leaf.path === "entra web-application-firewall-provider show" || leaf.path === "entra web-application-firewall-provider count" || leaf.path === "entra web-application-firewall-verification list" || leaf.path === "entra web-application-firewall-verification show" || leaf.path === "entra web-application-firewall-verification count" || leaf.path === "entra web-application-firewall-verification provider show") {
|
|
1394
|
+
if (String(flags["api-version"] ?? "v1.0") !== "v1.0") {
|
|
1395
|
+
throw new AxiError("Risk-prevention reads support v1.0 only; beta needs its own review", "VALIDATION_ERROR", [leafHelp(leaf)]);
|
|
1396
|
+
}
|
|
1397
|
+
const selected = profiles.resolve(flags.profile);
|
|
1398
|
+
const operation = operationFor(leaf, "v1.0");
|
|
1399
|
+
if (!operation || operation.method !== "GET") {
|
|
1400
|
+
throw new AxiError(`Unknown catalogued Graph operation for ${leaf.path}`, "VALIDATION_ERROR", [leafHelp(leaf)]);
|
|
1401
|
+
}
|
|
1402
|
+
let delegated = overrides.delegated;
|
|
1403
|
+
let application = overrides.application;
|
|
1404
|
+
if (!delegated) {
|
|
1405
|
+
const { DelegatedAuth: Service } = await import("./auth.js");
|
|
1406
|
+
const { MsalProvider } = await import("./msal-provider.js");
|
|
1407
|
+
delegated = new Service(new MsalProvider());
|
|
1408
|
+
}
|
|
1409
|
+
if (!application) {
|
|
1410
|
+
const { ApplicationAuth: Service } = await import("./app-auth.js");
|
|
1411
|
+
const { MsalApplicationProvider } = await import("./msal-app-provider.js");
|
|
1412
|
+
application = new Service(new MsalApplicationProvider());
|
|
1413
|
+
}
|
|
1414
|
+
const session = new GraphSession({ delegated, application, transport: overrides.transport ?? fetchTransport });
|
|
1415
|
+
const help = leafHelp(leaf);
|
|
1416
|
+
switch (leaf.path) {
|
|
1417
|
+
case "entra fraud-protection-provider list": return listFraudProtectionProviders(session, flags, selected.profile, operation, help, selected.name);
|
|
1418
|
+
case "entra fraud-protection-provider show": return showFraudProtectionProvider(session, flags, selected.profile, operation, help, selected.name);
|
|
1419
|
+
case "entra fraud-protection-provider count": return countFraudProtectionProviders(session, flags, selected.profile, operation, help);
|
|
1420
|
+
case "entra web-application-firewall-provider list": return listWafProviders(session, flags, selected.profile, operation, help, selected.name);
|
|
1421
|
+
case "entra web-application-firewall-provider show": return showWafProvider(session, flags, selected.profile, operation, help, selected.name);
|
|
1422
|
+
case "entra web-application-firewall-provider count": return countWafProviders(session, flags, selected.profile, operation, help);
|
|
1423
|
+
case "entra web-application-firewall-verification list": return listWafVerifications(session, flags, selected.profile, operation, help, selected.name);
|
|
1424
|
+
case "entra web-application-firewall-verification show": return showWafVerification(session, flags, selected.profile, operation, help, selected.name);
|
|
1425
|
+
case "entra web-application-firewall-verification count": return countWafVerifications(session, flags, selected.profile, operation, help);
|
|
1426
|
+
default: return showVerificationProvider(session, flags, selected.profile, operation, help, selected.name);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1291
1429
|
const operation = operationFor(leaf, String(flags["api-version"] ?? "v1.0"));
|
|
1292
1430
|
throw new AxiError(`Command is not executable: ${operation?.disposition ?? "unavailable"} (${operation?.owningSlice ?? "no inventory mapping"})`, "NOT_IMPLEMENTED", [leafHelp(leaf)]);
|
|
1293
1431
|
}
|