SharePoint Online - Get Sites

Overview

The SharePoint Online - Get Sites Snap retrieves specific metadata information of a specific site and retrieves the sub-sites of the selected site.



  • 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 application in Azure portal with all the required API permissions.

Limitations

  • In SharePoint Online environments with a very large number of sites (for example, more than 100,000), the Get Sites Snap may fail to populate site suggestions in the Snap UI. In some cases, requests to retrieve site metadata may also experience increased latency or timeout due to the volume of sites being queried. To avoid these issues, specify the site identifier explicitly.

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 information that needs to get the document library metadata.

Output

This Snap has exactly one document output view.

A document containing the metadata of the document library or a complete list of document libraries in the mentioned site.

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 - Get Sites

Example: SharePoint Online - Get Sites

Site*

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

Displays Enumerate subsites checkbox.

Default value: N/A

Example: MySite

Enumerate subsites

Checkbox
Select this checkbox to get a collection of subsites available for a site.

Appears when you specify or select a value in the Site field.

Default value: Deselected

Search Query*

String/Expression
Specify keywords that match with one or more site names, as needed. The Snap searches and returns matching sites.

Appears when you select the Enumerate subsites checkbox.

This field is hidden if you select a specific site to retrieve the metadata information.

Default value: *

Example: micro*dev AND (performance OR process) NOT sales

Top

Integer/Expression
Specify the number of records to be read from the matched search results.

Appears when you select the Enumerate subsites checkbox.

Default value: 200

Example: 500

Auto Pagination

Checkbox
Select this checkbox to retrieve all matching site names as a paginated list.

If you select the Auto Pagination checkbox, the Top field is hidden.

Default value: Deselected

Generate document per page

Checkbox
Select this checkbox to generate output for each page as a separate document instead of accumulating results from all pages into a single document.

Appears when you select the Auto Pagination checkbox.

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: 0

Example: 5

Retry interval (seconds)*

Integer
Specify the time interval in seconds between connection attempts.

Default value: 1

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.

For more information about how to get the metadata of an item in the SharePoint Online, refer to the list-document-library in Graph API documentation.

Troubleshooting

Error Cause Resolution
Site name {siteName} is not found in the tenant. The site name that you have entered is not available in the tenant. Click the Suggestion icon and select the site or enter a valid site name manually.
Forbidden exception. Either the user or the app does not have sufficient permissions to read the metadata for the document library. Ensure that you provide both user-level and app-level permissions required to access the metadata.