Skip to content

Function: getDriveItemsEval()

ts
function getDriveItemsEval(
   ctx: Context, 
   token: string, 
   options: {
  driveId: string;
}): Promise<any>;

Defined in: src/ms-graph/sharepointGraphEval.ts:275

Get root-level drive items via the Graph API (browser eval variant).

Parameters

ParameterTypeDescription
ctxContextThe SDK context.
tokenstringAccess token from getSharePointTokenUserAuth.
options{ driveId: string; }The drive identifier.
options.driveIdstringThe drive ID.

Returns

Promise<any>

An array of drive items at the root level.

Example

ts
const token = await getSharePointTokenUserAuth(ctx, authProps);
const items = await getDriveItemsEval(ctx, token, { driveId: 'drive-abc123' });
items.forEach((item: any) => console.log(item.name));

Matterway Assistant SDK Documentation