Skip to main content

Search Drive Items

Prerequisite Permissions: Search Drive Items step need the following permissions.

Permission typePermission (from least to most privileged)
Delegated (work or school account)Files.Read, Files.ReadWrite, Files.Read.All, Files.ReadWrite.All
Delegated (personal Microsoft account)Files.Read, Files.ReadWrite, Files.Read.All, Files.ReadWrite.All

Description

One Drive: Search Drive Items step is used to search drive items.

Note:

  • Support is provided for the Personal Drive, however, the displayed error message is not correct.

Reference: https://docs.microsoft.com/en-us/graph/api/driveitem-search?view=graph-rest-1.0&tabs=http

Configurations

No.Field NameDescription
Configuration:
1Step NameName of the step. This name has to be unique in a single workflow.
Connection:
2Client IDSelect the client ID for which you want to copy a file or folder.
Note: This field is mandatory for personal accounts.
3Checkbox: Accept value as variable/staticLeave checkbox unchecked to accept Refresh Token value from a field in the previous steps of the stream using a drop down list.
Else enable checkbox for Refresh Token field to appear as Text box.
4Refresh TokenSpecify the Refresh Token provided by authorization grant flow.
The data type is String. This field is mandatory.
5Button: Test ConnectionVerifies whether the connection is established or not.
Input Tab
Input Fields:
1Query TextProvide the query text to search the items present in OneDrive. It will work on the file name or folder name.
Note: Wildcard search is not supported.
The data type is String. This field is mandatory.
2Order ByThe order by table field is used to specify the sort order of the drive items.
3Sort OnSpecify the property name on basis of which you want to sort the result.
For example: name desc
The following request gets the drive items and sorts them by the name field in descending order.
The data type is String. This field is mandatory.
4Sort TypeSelect the sorting order of the values in ascending or descending manner.
Allowed values: asc, desc
The default sorting order is, ascending, that is, asc.
The data type is String. The field is mandatory.
Output Tab
1JSONOutputDefine the output variable name in the field.
Default output variable name: JSONOutput
On successful execution, it holds the output of the plugin step in JSON format.

Known Issues:
Sometimes, you may see a temporary error related to the internet connectivity and network issues. The issue arises when the hostname is unresolved and the local server does not receive a response from an authoritative server. For example, you may see any of the following messages:

  • login.microsoftonline.com.
    OR
  • This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server (login.microsoftonline.com)