Skip to content

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

ParameterTypeDescription
clientClientThe Microsoft Graph client instance.
options{ siteId: string; }The site identifier.
options.siteIdstringThe 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));

Matterway Assistant SDK Documentation