View as Markdown
Sharepoint icon

Sharepoint ACTION

Search Files

Search for files across the tenant. Supports KQL via the optional query template.

Backed by the Microsoft Search index and eventually consistent — newly created or modified files may not appear until indexing catches up.

For immediate, deterministic results, prefer:

  • Get File by ID when the ID is known
  • List Files in Folder for path-based listing
  • Search and Filter Files for OData $filter against a document library

See the documentation

  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Sharepoint account once, then configure and run Search Files from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "sharepoint-search-files",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    sharepoint: { authProvisionId: "apn_xxxxxxx" },
    queryString: "Query String",
    queryTemplate: "Query Template",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Search Files inputs
Property Type Description
queryString Query String string
The search query containing the search terms
Required
queryTemplate Query Template string
Provides a way to decorate the query string. Supports both KQL and query variables. Example: ({searchTerms}) AuthorOWSUSER:Adventure See the documentation for more information.
Optional
select Select string
A comma-separated list of properties to return in the response
Optional
size Max Results integer
The maximum number of results to return
Optional
sortField Sort Field string
The field to sort the results by
Optional
descending Descending boolean
Whether to sort the results in descending order
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
sharepoint-search-files
Version
0.0.9
App
Sharepoint
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes