Refactor of authentication code. Added configuration file selectable authentication method. Selectable from built-in Azure Identity, and custom PCA using MSAL.
Some checks failed
build / build (push) Failing after 14s
Some checks failed
build / build (push) Failing after 14s
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
import { listAppPermissions, listAppPermissionsResolved } from "../../graph/app.ts";
|
||||
|
||||
import { filterByPermissionName, getGraphClientFromPublicConfig } from "./shared.ts";
|
||||
import { filterByPermissionName } from "./shared.ts";
|
||||
import { getGraphClient } from "../../graph/index.ts";
|
||||
import type { CommandValues } from "./types.ts";
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
@@ -37,7 +38,7 @@ export async function runListAppPermissionsCommand(values: CommandValues): Promi
|
||||
throw new Error("--app-id is required for list-app-permissions");
|
||||
}
|
||||
|
||||
const { client } = await getGraphClientFromPublicConfig();
|
||||
const client = await getGraphClient();
|
||||
let result: unknown = values.resolve || values.filter
|
||||
? await listAppPermissionsResolved(client, values["app-id"])
|
||||
: await listAppPermissions(client, values["app-id"]);
|
||||
|
||||
Reference in New Issue
Block a user