Appearance
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
| Parameter | Type | Description |
|---|---|---|
ctx | Context | The SDK context. |
token | string | Access token from getSharePointTokenUserAuth. |
options | { driveId: string; folderId: string; } | The drive and folder identifiers. |
options.driveId | string | The drive ID. |
options.folderId | string | The 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));