Actions13
Folder → Search
AI-generatedSummary
Search folders in a OneDrive Business user drive or SharePoint site document library using a text query, returning only folder items.
Inputs
- driveType (required) — Type of drive to access
- query (required) — Search query
- userId (required) — User principal name or ID (shown when driveType is user)
- siteId (required) — SharePoint site ID (shown when driveType is site)
Output shape
Array of folder items matching the query, each as a paired JSON object containing the Microsoft Graph DriveItem structure. Files are filtered out; only folders are included.
Uses Microsoft Graph API
/root/search(q='...')with pagination viagetAllPages, filters results where!!item.folderis true.
Examples
Example 1: Search for a folder named 'Reports' in the user's OneDrive
driveType: user, userId: user@contoso.com, query: Reports