MS OneDrive Business icon

MS OneDrive Business

Access MS OneDrive for Business and SharePoint

File → Search

AI-generated

Summary

Search for files matching a query string in the selected OneDrive Business location.

Inputs

  • driveType — Drive type to search: User Drive, SharePoint Site Drive, or Shared Folder (Link).
  • sharedLinkUrl (required) — Paste a sharing link to a shared folder (required when driveType is Shared Folder).
  • userId — User email or ID; leaves empty to use the authenticated user.
  • siteId (required) — SharePoint site identifier; required when driveType is SharePoint Site Drive.
  • fileSharingUrl (required) — Paste a sharing link to the file or folder to be searched (required for all operations).
  • query (required) — Search query string to match file names or content.

Output shape

Array of file metadata objects (up to 100 items).

Each element contains the full Graph item JSON for a matching file (e.g., id, name, webUrl). Results are limited to the first 100 items; pagination is not exposed.

Examples

Example 1: Search user OneDrive for PDFs named “budget”.

driveType=user; query=budget; fileSharingUrl omitted (not needed).

Example 2: Search a shared folder via its sharing link for documents containing “invoice”.

driveType=sharedLink; sharedLinkUrl=https://contoso.sharepoint.com:/f:/...; query=invoice.

Example 3: Search files in a specific SharePoint site for the term “contract”.

driveType=site; siteId=contoso.sharepoint.com,12345-abc; query=contract.

Links

Discussion