Search Files or Folders

Search a file or folder in OneDrive. Search may be matched across several fields including file or folder name, metadata, and file content.

Options

Field Definition Type Required
Result Set

Choose a method to filter search results:

  • First Matching Record: returns the first record that matches.
  • First 200 Matching Records: returns the first 200 matching records.
  • Stream Matching Records: passes all matching records from your parent flow to a helper flow. A Streaming input section is added to the card from which you can select a helper flow for streaming and adding custom extensible fields.
Dropdown TRUE
Source

Choose a source:

  • My Drive: authenticated user's OneDrive.
  • Drive ID: a specified drive by the drive's unique ID.
  • Group ID: a specified group's document library for a group by the group's unique ID.
  • User ID: a specified user by the user's unique ID.
Dropdown TRUE

Input

Field Definition Type Required
Query Query text used to search for items. Values may be matched across several fields including file or folder name, metadata, and file content. String TRUE
Drive      
Drive ID

Unique ID for the drive requested.

Appears when Drive ID is selected from the Source option.

String TRUE
Group      
Group ID

Unique ID for the group which owns the document library.

Appears when Group ID is selected from the Source option.

String TRUE
User      
User ID

Unique ID for the user object who owns the drive item.

Appears when User ID is selected from the Source option.

String TRUE
Search Criteria      
Record Limit

Specify the number of records to stream.

  • When the Limit field is set to 0, no records are returned.

  • When the Limit field is set to greater than 0, records greater than 0 and up the maximum number of records specified are returned.

  • When the Limit field is empty or not selected, all records are streamed.

  • Default value is 10 million.

  • Valid range is 0 to 10 million.

Appears when Stream Records is selected from the Result Set option.

Number FALSE
Streaming      
Flow Click Choose Flow to browse and select a helper flow to which the search results will be streamed, then click Choose to confirm.

Optionally, click the empty field under Click or drop here to create and add custom extensible fields that pass data to the helper flow. These fields are added as key/value pairs under the State output object in the helper flow.

Appears when Stream Records is selected from the Result Set option.

Flow TRUE

Output

Field Definition Type
Files or Folders    
File and Folder ID Unique ID of the file or folder. String
Name Name of the item. String
Type Type of the drive item. Possible values are: File or Folder. String
Parent Reference    
Drive ID Unique ID for the drive requested.

This field appears for Drive ID selected from Location in Options.

String
Drive Type    
Parent Folder ID ID of the folder to which you want to upload the file; leave empty for root. String
Created By    
Name Name of the user who created the item. String
Email Unique ID of the user. String
Created Date Date and time of item creation. Date and Time
Last Modified By The last user to modify the resource.  
Name Name of the user who modified the item. String
Email Unique ID of the user. String
Last Modified Identity of the folder which last modified the item. String
Folder    
Child Count Number of children contained immediately within this container. Number
File    
Mime Type MIME type for the file. This is determined by logic on the server and might not be the value provided when the file was uploaded. String
Web URL URL that displays the resource in the browser. String
Size Size of the item in bytes. Number
Records Streamed

Number of records streamed in a streaming flow.

Appears when Stream Matching Records is selected from the Result Set option.

String

Additional information

  • Users must be part of the group or have direct access to the file to read permissions of a file in that group.

Related topics

OneDrive connector

About the elements of Okta Workflows

Microsoft Graph API documentation