Microsoft OneDrive Query
You can use this activity to get the Metadata for Drive and Drive Item, to download files, fetch recent items, and Search Items from Microsoft OneDrive.
Configuration
This tab has the following fields.
Field | Description |
---|---|
Connection |
Lists all Microsoft OneDrive connections. If no connection is found, create a Microsoft Office 365 connection. |
Ownership | Lists all ownership types that can be identified by Microsoft OneDrive. These include Me, Users, Groups, Drives, and Sites. |
Resource | Lists two resources, Drive and DriveItem. The operations vary as per the resource selected. |
Operation | Lists all operations available for a selected resource.
The Resources and Operations table below lists all operations available for different resources and also defines each operation in detail. |
Item Identifier | Lists item identifiers for the selected operation. It includes
getByItemId and
getByItemPath. This field is visible only if you make the following selections in the Configuration tab:
Resource:DriveItem Operation:Get Metadata or File Download |
Desired Output | User can select the output format either as a
Location Url or file content in form of
base64 String. This field is visible only if you make the following selections in the Configuration tab:
Resource:DriveItem Operation:File Download |
Convert to PDF | (Optional radio button) User can choose to download a file in PDF format. This field is visible only if you make the following selections in the Configuration tab:
Resource:DriveItem Operation:File Download |
Input Settings
This tab has the required OData configuration fields to define the query parameters for the activity.
Field | Description |
---|---|
Orderby | Determines what values are used to order a collection of DriveItem resources. This field is visible only if you make the following selections in the
Configuration tab:
Resource:DriveItem Operation:Fetch Recent Files or Search Items |
Input
Field | Description |
---|---|
idOrUserPrincipalName | The identifier for the user object who owns OneDrive. This field is visible in the Input tab if you make the following selections in the
Configuration tab:
Ownership:Users |
groupId | The identifier for the group that owns the document library. This field is visible in the Input tab if you make the following selections in the
Configuration tab:
Ownership:Groups |
driveId | The identifier for drive requested. This field is visible in the Input tab if you make the following selections in the
Configuration tab:
Ownership:Drives |
siteId | The identifier for the site that contains the document library. This field is visible in the Input tab if you make the following selections in the
Configuration tab:
Ownership:Sites |
itemPath/itemId |
File system path or ID. itemPath and itemId appear when Item Identifier is getByItemPath and getByItemId respectively. This field is visible in the Input tab if you make the following selections in the Configuration tab:Resource:DriveItem Operation:File Download or Get Metadata |
searchText | The query text used to search for items. Values may be matched across several fields including filename, metadata, and file content. This field is visible in the Input tab if you make the following selections in the
Configuration tab:
Resource:DriveItem Operation:Search Items |
odataparams > Top | The number of items to return in a result set. This field is visible in the Input tab if you make the following selections in the
Configuration tab:
Resource:DriveItem Operation:Fetch Recent Files or Search Items |
Output
The properties that are displayed in the Output tab schema correspond to the output of this activity and can be used as input by subsequent activities in the flow. The output of an activity is displayed for informational purposes only and cannot be modified.
Resource | Operation | Output Reference |
---|---|---|
Drive | Get Metadata | For a detailed output reference, see JSON representation for the Drive resource type located under Microsoft OneDrive documentation. |
DriveItem | Get Metadata | For a detailed output reference, see JSON representation for the DriveItem resource type located under Microsoft OneDrive documentation. |
Fetch Recent Files and Search Item Operation | For a detailed output reference, see Response for the List children of a driveItem in the Microsoft OneDrive documentation. located under Microsoft OneDrive documentation. | |
File Download | If you select Location Url in the Desired Output field, the output schema displays the Location field. | |
File Download | If you select base64 string in the Desired Output field, the output schema displays the Content field. |