SharePoint Online - Search Items

Overview

The SharePoint Online - Search Items Snap performs a search for the hierarchy of items matching the search query.

You can search within a folder hierarchy, a whole drive, or files shared with the current user.



  • 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.

An input document contains the metadata of the item that can be used in the search item query.

Output

This Snap has exactly one document output view.

An output document contains the metadata information of items that match the search query.

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 - Search Items

Example: SharePoint Online - Search 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 a prefix 'sites/' before the sitename, a custom site can contain the prefix 'teams/' or it can have no prefix.

Default value: Deselected

Document Library*

String/Expression
Specify a drive representing the top-level container for a file system, such as OneDrive or SharePoint document libraries. This field will be populated dynamically from different sites from the suggestion drop-down list. You can either choose a document library from suggestion drop-down list or enter the entity name manually.
Note: If you enable the Site property as an expression, then the document library is not suggested, resulting in an exception.

Default value: N/A

Example: Shared Documents

Source Item Relative Path*

String/Expression
Specify the item resource path that represents a file, folder, or other item stored in a document library.

Default value: N/A

Example: testFile.pdf

Search Query

String/Expression
Specify keywords to be searched. It searches the filenames and content of files in SharePoint Online and finds matching documents.

Default value: N/A

Example: pdf

Select Fields

String/Expression
Enter the comma-separated properties to be written to the output view.

Default value: N/A

Example: id, email, roles

Order by Properties Use this fieldset to enter the properties and order they want to be displayed when found more 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 at the server-side. Available options are:
  • asc
  • desc

Default value: asc

Example: desc

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 check box, ensure that the Top field is blank.

Default value: Deselected

Connection details Use this field set 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 search items in SharePoint Online, refer to the graph API in driveItem-search.

Troubleshooting

Error Cause Resolution
HTTP Response Code:404 Entered item not found in the document library. Ensure to provide the valid item path to get the metadata.
Forbidden exception:403 Either user or app doesn't have sufficient permissions to read the metadata for the document library. Ensure to provide the desired permissions both at the user and application level.
Internal Server Error: 501 Value for the Property name might have missed. Ensure to provide the value for the property name in the Order by Properties.