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