Retrieves the items (folders and files) from the root of a specified drive.
The Microsoft Graph client instance used to make requests.
An object containing the siteId and driveId.
The ID of the drive to retrieve items from.
The ID of the SharePoint site.
A promise that resolves to an array of drive items.
const client = await getSharePointClient(opt);const options = { siteId: 'your-site-id', driveId: 'your-drive-id' };const items = await getDriveItems(client, options);console.log(items); Copy
const client = await getSharePointClient(opt);const options = { siteId: 'your-site-id', driveId: 'your-drive-id' };const items = await getDriveItems(client, options);console.log(items);
Retrieves the items (folders and files) from the root of a specified drive.