Appearance
Function: getDrives()
ts
function getDrives(client: Client, options: {
siteId: string;
}): Promise<any>;Defined in: src/ms-graph/sharepointGraph.ts:49
Get all drives for a SharePoint site.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | The Microsoft Graph client instance. |
options | { siteId: string; } | The site identifier. |
options.siteId | string | The SharePoint site ID. |
Returns
Promise<any>
The response containing the list of drives.
Example
ts
const client = await getMsGraphClient(creds);
const drives = await getDrives(client, { siteId: 'contoso.sharepoint.com,abc123,def456' });
console.log('Drives:', drives.value.map((d: any) => d.name));