Search Drive Items
Prerequisite Permissions: Search Drive Items step need the following permissions.
Permission type | Permission (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 Name | Description |
---|---|---|
Configuration: | ||
1 | Step Name | Name of the step. This name has to be unique in a single workflow. |
Connection: | ||
2 | Client ID | Select the client ID for which you want to copy a file or folder. Note: This field is mandatory for personal accounts. |
3 | Checkbox: Accept value as variable/static | Leave 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. |
4 | Refresh Token | Specify the Refresh Token provided by authorization grant flow. The data type is String. This field is mandatory. |
5 | Button: Test Connection | Verifies whether the connection is established or not. |
Input Tab | ||
Input Fields: | ||
1 | Query Text | Provide 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. |
2 | Order By | The order by table field is used to specify the sort order of the drive items. |
3 | Sort On | Specify 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. |
4 | Sort Type | Select 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 | ||
1 | JSONOutput | Define 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)