Skip to end of banner
Go to start of banner

SharePoint Online - Get Sites

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

In this article

Overview

SharePoint Online - Get Sites is a Read-type Snap that enables you to get the list of sites specific to the logged-in user from the SharePoint Online site. You can also:

  • retrieve specific metadata information of a specific site.

  • retrieve the sub-sites of the selected site. (Optional)

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.

Prerequisites

  • Valid SharePoint Online tenant and associated site.

  • Valid application in Azure portal with all the required API permissions.

Support for Ultra Pipelines

Works in Ultra Pipelines

Limitations and Known Issues

None.

Snap Views

View Type

View Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

  • Min:0

  • Max:1

  • Mapper Snap

  • Copy Snap

  • CSV Parser

  • JSON Parser

A document containing the metadata information that needs to get the document library metadata.

Output

Document

  • Min:1

  • Max:1

  • Mapper Snap

  • Copy Snap

  • CSV Parser

  • JSON Parser

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

Snap Settings

Field names marked with an asterisk ( * ) are mandatory.

Field Name

Field Type

Field Dependency

Description

Default Value

Example 

Label*

String

N/A

Specify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.

N/A

SharePoint Online - Get Sites

Site

String/Expression/Suggestion

Enables Enumerate subsites checkbox.

Specify the name of a site to get the metadata information.

N/A

MySite

Enumerate subsites

Checkbox

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

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

Not selected

 N/A

Search query*

String/Expression

Enabled when you select the Enumerate subsites checkbox.

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

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

*

micro*

dev AND (performance OR process) NOT sales

Top

Integer/Expression

Enabled when you select the Enumerate subsites checkbox.

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

200

500

Auto pagination

Checkbox

N/A

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.

Not selected

 Selected

Connection details

Use this field set to define connection parameters to access SharePoint Online. This field set contains the following fields:

  • Connection timeout

  • Number of retries

  • Retry interval (seconds)

Connection timeout*

Integer

N/A

Specify the connection timeout duration in seconds.

30

30

Number of retries*

Integer

N/A

Specify the maximum number of retries in case of connection failure or timeout.

1

3

Retry interval (seconds)*

Integer

N/A

Specify the time interval in seconds between connection attempts.

0

10

Snap Execution

Dropdown list

N/A

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

Execute only

Validate & Execute

Troubleshooting

Error

Reason

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 (blue star) 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.

Example

Retrieving Sites List

This example demonstrates how to retrieve the list of sites of a user who is authenticated while creating the account. This example assumes that you have configured and authorized a valid account for the SharePoint Online - Get Sites Snap. For more information about configuring account, see SharePoint Online Account.

First, we configure the SharePoint Online - Get Sites Snap as follows to get the list of sites. We leave the default values as is.

After successfully validating the Pipeline, the Snap gets all the sites from SharePoint Online and displays the first 200 matching sites in the page.

Next, we connect the JSON Formatter Snap to format the output into a JSON file, and finally write the file to the database using the File Writer Snap.

Download this Pipeline

Downloads

Important Steps to Successfully Reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Furnish Pipeline parameters as applicable.

  File Modified
You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.
No files shared here yet.
  • Drag and drop to upload or browse for files
  • Snap Pack History


    See Also

    • No labels