MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / listUsersCode

Function listUsersCode

e2e/scenarios/microsoft-emulator.test.ts:77–85  ·  view source on GitHub ↗
(integration: string)

Source from the content-addressed store, hash-verified

75 });
76
77const listUsersCode = (integration: string) => `
78const found = await tools.search({ namespace: ${JSON.stringify(integration)}, query: "list users", limit: 10 });
79const item = found.items.find((candidate) => candidate.path.includes("graphUser"));
80if (!item) return { ok: false, error: "graph users tool not found", found };
81let callable = tools;
82for (const segment of item.path.split(".")) callable = callable[segment];
83const result = await callable({});
84return { ok: result.ok, path: item.path, result: result.ok ? result.data : result.error };
85`;
86
87scenario(
88 "Microsoft · client credentials against the emulator mint a Graph connection and call /users",

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected