SharePoint Online - List Read Items

Overview

The SharePoint Online - List Read Items Snap reads items of a list from the SharePoint Online site.

The Snap allows the following operations on the list of items being read:

  • Filter the list items using query parameters
  • Retrieve item details from specific fields (columns) in the list
  • Sort the list items retrieved in the result


  • This is a Read-type Snap.
  • Works in Ultra Tasks. However, we recommend that you do not use this Snap in an Ultra Pipeline.

Prerequisites

  • Valid SharePoint Online tenant and associated site.
  • Valid Azure application with all the required API permissions.

Snap views

Type Description Examples of upstream and downstream Snaps
Input

This Snap has at most one document input view.

A document containing the metadata of the list items to be retrieved.

Output

This Snap has exactly one document output view.

A document containing the list items in the selected list.

Learn more about Error handling.

Snap settings

Note: Learn about the common controls in the Snap settings dialog.
Field/Field set Description
Label*

String

Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: SharePoint Online - List Read Items

Example: SharePoint Online - List Read Items

Site*

String/Expression
Specify the name of a site which contains the list of document library to be used in the subsequent Snap settings.

Default value: N/A

Example: MySite

Custom Site Path

Checkbox
Enable this option if your site URL contains a custom path that deviates from the default site URL. Default site path always has the prefix 'site/' before the sitename, a custom site can contain the prefix 'team/' or it can have no prefix.

Default value: Deselected

List name*

String/Expression/ Suggestion
Select a list name from the document library suggestions provided in this field. The suggested list names pertain to the SharePoint Online site specified already.
Note: This field cannot provide any document library suggestions when you define Site as an expression. This may result in an exception for suggestions.

Default value: N/A

Example: Demolist

Filter query

String/Expression
Enter the query to filter the retrieved list of items from the selected list when you want to retrieve a set of list items.

Default value: N/A

Example: startsWith(fields/Title, 'Demo')

Select fields

String/Expression
Specify the comma-separated field/column names from the metadata to be included to the output view.

Default value: N/A

Example: id, webUrl, lastModifiedBy

Expand list items

String/Expression
Specify the comma-separated column names of the list to be retrieved from the list.

Default value: N/A

Example: Title

Top

Integer/Expression
Specify an integer value to define the number of retrieved list items to be displayed per page (pagination).
Note: While providing a value in this field, do not select Auto pagination check box.

Default value: 200

Example: 100

Auto pagination

Checkbox
Select this checkbox to retrieve all items within the selected folder/directory. If not selected (by default), the Snap returns a maximum of 200 records per page.
Note: While selecting this checkbox, ensure that the Top field is blank.

Default value: Deselected

Order by Properties Use this fieldset to enter the properties and order they want to be displayed when found more than one item with one or more similar properties.
Property name

String/Expression
Specify the attribute name of the item/drive/folder to be sorted.

Default value: N/A

Example: name

Order type

Dropdown list/Expression
Select the appropriate order type to perform the sorting on the server-side. Available options are:
  • asc
  • desc

Default value: asc

Example: desc

Connection details Use this fieldset to specify connection properties to the SharePoint Online APIs.
Connection Timeout*

Integer
Specify the connection timeout duration in seconds.

Default value: 30

Example: 40

Number of Retries*

Integer
Specify the maximum number of reconnections in case of a connection failure or timeout.

Default value: 3

Example: 5

Retry Interval (seconds)*

Integer
Specify the time interval in seconds between connection attempts.

Default value: 10

Example: 11

Snap execution

Dropdown list
Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only. Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all Snaps that are downstream from it.
Note: For more information on how to read items in a list in the SharePoint Online, refer to the graph API documentation: list-items-read.

Troubleshooting

Error Cause Resolution
HTTP Response Code:404 The specified List name was not found. Ensure that the entered List name is valid and that the Snap has access to it.
Forbidden exception:403 Either the user or the app does not have sufficient permissions to read the metadata for the document library. Ensure that the required permissions are provided to the account both at the user level and the application level.
HTTP Response Code:400 Response Message: Invalid filter clause Ensure that the filter condition provided is valid and does not resolve to zero records.
Failure: The fields "Automatic pagination" and "Top" cannot be used at the same time. Please implement only one of them. The Snap can either perform automatic pagination of all records or retrieve the top n number of records for the result set, but not both simultaneously. Select/specify only one of these options: Auto pagination check box, Top field.