Appearance
Function: getDrivesEval()
ts
function getDrivesEval(
ctx: Context,
token: string,
options: {
siteId: string;
}): Promise<any>;Defined in: src/ms-graph/sharepointGraphEval.ts:214
Get all drives from a SharePoint site via the Graph API (browser eval variant).
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | Context | The SDK context. |
token | string | Access token from getSharePointTokenUserAuth. |
options | { siteId: string; } | The site identifier. |
options.siteId | string | The SharePoint site ID. |
Returns
Promise<any>
An array of drive objects.
Example
ts
const token = await getSharePointTokenUserAuth(ctx, authProps);
const drives = await getDrivesEval(ctx, token, {
siteId: 'contoso.sharepoint.com,abc123,def456',
});
console.log('Drives:', drives.map((d: any) => d.name));