Matterway
    Preparing search index...

    Function getDriveItems

    • Retrieves the items (folders and files) from the root of a specified drive.

      Parameters

      • client: Client

        The Microsoft Graph client instance used to make requests.

      • options: { siteId: string; driveId: string }

        An object containing the siteId and driveId.

        • siteId: string

          The ID of the SharePoint site.

        • driveId: string

          The ID of the drive to retrieve items from.

      Returns Promise<any>

      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);