Matterway
    Preparing search index...

    Function getListItems

    • Retrieves the items from a specified SharePoint list.

      Parameters

      • client: Client

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

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

        An object containing the site ID and list ID.

        • siteId: string

          The ID of the SharePoint site.

        • listId: string

          The ID of the SharePoint list.

      Returns Promise<any[]>

      A promise that resolves to an array of list items.

      const client = await getSharePointClient(opt);
      const options = { siteId: 'your-site-id', listId: 'your-list-id' };
      const items = await getListItems(client, options);
      console.log(items);