Skip to content

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

ParameterTypeDescription
ctxContextThe SDK context.
tokenstringAccess token from getSharePointTokenUserAuth.
options{ siteId: string; }The site identifier.
options.siteIdstringThe 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));

Matterway Assistant SDK Documentation