Get Sites

Retrieves SharePoint sites accessible via the Microsoft Graph API.

Syntax

Below is a line-by-line overview of the automation syntax. Expand each line to learn more.

get sites from sharepoint [whose [condition]]

Retrieves SharePoint sites accessible via the Microsoft Graph API. It can optionally filter based on a given condition.

Base Syntax

get some sites from sharepoint

  • What does it do? This is the base syntax for the procedure.

  • Where does it go? This phrase should be written on a new line.

  • Is it required? ✅ Yes — This part of the phrase is required.

  • Does it require input data? ⛔ No — This part of the phrase does not require input data.

Filter Condition Syntax

whose [condition]

  • What does it do? This is an optional clause used to specify a condition for filtering.

  • Where does it go? If used, this clause immediately follows the get some sites from sharepoint phrase on the same line.

  • Is it required? 🌟 No — This clause is optional in the syntax.

  • Does it require input data? ✅ Yes — This clause requires a condition (a filter expression) to be specified.

Examples

1. Retrieve accessible sites from SharePoint

get sites from sharepoint
process each site as follows
    say the site's name

2. Retrieve a single site by name

get sites from sharepoint whose name is "Human Resources"

Using a Single SharePoint Site

Even if you're getting just one site, SharePoint returns a set of matching results. So after this line:

get sites from sharepoint whose name is "Human Resources"

You'll need to add a line to specify a single site from the set of matching results:

use the first site as the site

Last updated

Was this helpful?