interface SharepointSearchServiceInterface

Interface for SharePoint file search via the Microsoft Graph API.

Methods

array
search(string $query, bool $documentsOnly = FALSE)

Searches SharePoint for files matching the given query.

Details

Searches SharePoint for files matching the given query.

Parameters

string $query

The search term (must be sanitized by the caller before passing).

bool $documentsOnly

TRUE to restrict results to linkable documents (excludes folders). FALSE returns all drive items including folders.

Return Value

array

The raw Graph API response array, or an empty array on failure.