Skip to content

Function: getDriveFromFolderItemsEval()

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

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

Get items from a folder in a SharePoint drive via the Graph API (browser eval variant).

Parameters

ParameterTypeDescription
ctxContextThe SDK context.
tokenstringAccess token from getSharePointTokenUserAuth.
options{ driveId: string; folderId: string; }The drive and folder identifiers.
options.driveIdstringThe drive ID.
options.folderIdstringThe folder ID.

Returns

Promise<any>

An array of items within the folder.

Example

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

Matterway Assistant SDK Documentation