Matterway
    Preparing search index...

    Function getDriveFolderItems

    • Retrieves the items within a specified folder in a SharePoint drive.

      Parameters

      • client: Client

        The Microsoft Graph client instance used to make the API call.

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

        An object containing the following properties:

        • itemId: string

          The ID of the folder whose items are to be retrieved.

        • driveId: string

          The ID of the drive containing the folder.

      Returns Promise<any>

      A promise that resolves to an array of items within the specified folder.

      const client = await getSharePointClient(opt);
      const options = { itemId: 'folderId', driveId: 'driveId' };
      const items = await getDriveFolderItems(client, options);
      console.log(items);