The SharePoint Component allows you to interact with your SharePoint Online environment via the Microsoft Graph API. This component enables operations such as retrieving, creating, updating, and deleting objects within your SharePoint sites and document libraries.
To build an integration flow, you must first register an OAuth 2.0 application in Azure Active Directory (Azure AD):
https://{your-tenant-address}/callback/oauth2, where {your-tenant-address} is the domain of your integration platform. Select Web as the platform type.Sites.Read.All – read sites and lists (required for read operations).Sites.ReadWrite.All – read and write sites, lists, and list items (required for write operations).Files.Read.All – read files in all site collections.Files.ReadWrite.All – read and write files in all site collections.After the OAuth client exists, configure the component credentials:
OAuth2.Add New Auth Client and supply:
https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize, where {tenant-id} is your Azure AD tenant ID (found in Azure AD → Overview → Tenant ID, or you can use common for multi-tenant apps).https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token, using the same {tenant-id}.https://graph.microsoft.com/.default (for application permissions) or specific delegated permissions like https://graph.microsoft.com/Sites.Read.All https://graph.microsoft.com/Sites.ReadWrite.All.5) – how many times requests are retried when throttled.10000) – wait time in milliseconds before the next retry.Important: The scopes configured in the Scope field must match the permissions granted to your Azure AD application. Mismatched or insufficient scopes will result in authentication errors or permission denied errors when executing operations.
For more information about registering an application in Azure AD, refer to the Microsoft documentation.
Polls SharePoint for objects that have been created or updated after the snapshot time. Results can be emitted one-by-one or as pages.
Base Site Pages).Last Modified) – which date/time field to evaluate (e.g., lastModifiedDateTime).1970-01-01T00:00:00Z when omitted. Format: YYYY-MM-DD[T]HH:MM:SS[Z].100) – number of records to request per API call; must be between 1 and 100 (reduced to 10 in debug/sample flows).Emit individually) – choose Emit individually to output each record separately or Emit page to output pages of results.Lookup Objects response for the selected object type.{ results: [...] } where results is an array with the same structure as the individual emit records.The trigger stores the latest seen value of the selected time stamp field. The next run starts strictly after that timestamp (plus one second when no new data was found) to avoid duplicate emissions.
Deletes a single object from SharePoint by its unique identifier (ID).
List, List Item, Site Column, List Column, Base Site Page, Drive Item.Drive Item: Site ID (required for soft delete) or Drive ID (required for permanent delete).Drive Item) – whether to permanently delete the drive item.Retrieves a single object from SharePoint using unique lookup criteria (ID, title, path, etc.).
Site, List, List Item, Site Column, List Column, Base Site Page, Drive, Drive Item.ID.List: ID or Title.Drive Item: ID or Path.Drive: ID or default (Site’s default Drive).default for Drive.Drive with default: Site ID (required).The output message contains a single object with properties specific to the selected object type. Common fields include:
For Drive Item objects, if Download To Maester is enabled and the item has a download URL, the output will include an internalUrl field pointing to the file stored in Maester storage.
Retrieves multiple objects from SharePoint. Can emit records individually or as pages.
Sites, Lists, List Items, Site Columns, List Columns, Base Site Pages, Content Types, Drives, Drive Folder Contents.Emit individually) – determines how records are emitted:
Emit individually – each record is emitted as a separate message.Emit All – all records are emitted in a single message as an array.The input schema is dynamically generated based on the selected object type and typically includes:
top (Page Size, string, optional, default 100) – maximum number of records to return per request. Must be between 1 and 100.filter, orderby, select, expand – additional OData query parameters as needed.$ prefix (e.g., top becomes $top, filter becomes $filter).Drive Folder Contents: Download To Maester (string, enum, optional) – whether to download files to Maester storage.The output structure depends on the selected Emit Behavior:
For Drive Folder Contents with Download To Maester enabled, items with download URLs will include an internalUrl field in the output.
Sends a custom HTTP request to the Microsoft Graph API. Use this action when you need functionality not covered by prebuilt actions.
None.
https://graph.microsoft.com/v1.0.GET, POST, PUT, PATCH, DELETE.Creates a new record or updates an existing one depending on the selected operation and the presence of a record ID.
Create to insert a new record or Update to modify an existing record. When Update is selected, an ID Value field becomes mandatory in the input metadata.Create: List, List Item, Site Column, List Column, Drive Item (Metadata), Drive Item (Content).Update: List Item, Site Column, List Column, Drive Item (Metadata), Drive Item (Content).The schema is generated dynamically based on the selected object type and operation. It contains all writable fields for that entity. Common fields include:
Update; ignored when Create is selected.fail, replace, or rename.Drive Item (Content):
Note: For Drive Item (Content), the Create operation creates a new file, while the Update operation replaces the content of an existing file.
Matches the record returned by Microsoft Graph after the upsert. Common fields include id, name, createdDateTime, lastModifiedDateTime, and any other properties available on the selected object type.
Example 1: Create Drive Item (Metadata) - Create a Folder
{
"siteId": "1234567890abc",
"parentId": "root",
"name": "My New Folder",
"description": "A folder for organizing documents",
"folder": {},
"conflictBehavior": "rename"
}
Example 2: Update Drive Item (Metadata) - Update File Metadata
{
"siteId": "1234567890abc",
"idValue": "01ABC123DEF456GHI789",
"name": "Updated Document.pdf",
"description": "Updated description for the document"
}
Example 3: Create List
{
"siteId": "1234567890abc",
"displayName": "Project Tasks",
"description": "A list to track project tasks and milestones",
"list": {
"template": "genericList",
"hidden": false
}
}
List Items object type in the polling trigger, List ID must be provided in addition to Site ID.Create operation with Drive Item (Content) object type) only supports files up to 250 MB in size.Click here to learn more about the elastic.io iPaaS