Read File or Folder

Retrieve metadata for a file or folder in OneDrive.

Options

Field Definition Type Required
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 Type Choose the input type for specifying the parent directory where the folder is created:
  • Folder ID:unique ID of the folder.
  • Folder Path:file system path of the folder.
Dropdown TRUE

Input

Field Definition Type Required
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
Drive Item      
File or Folder ID Unique ID of the file or folder. String TRUE
File or Folder Path File system path of the file or folder. String TRUE

Output

Field Definition Type
File or Folder ID Unique identifier of the file or folder.

Must have a leading forward slash "/".

For example,

Read a file in the root directory:

/fileName.pdf

Read a folder in a subfolder:

/folderName/subFolderName

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 of the drive. String
Drive Type Describes the type of drive represented by this resource. OneDrive personal drives will return personal. OneDrive for Business will return business. String
Parent Folder ID Unique ID of parent folder. String
Path File system path of the file or folder. String
Created By    
Name Name of the user who created the file or folder. String
Email Email address of the user who created the file or folder.  
User ID Unique ID of the user. String
Created Date Date and time of item creation. Date and Time
Last Modified By    
Name Name of the user who modified the file or folder. String
Email Email address of the user who modified the file or folder. String
User ID Unique ID of the user. String
Last Modified Identity of the folder which last modified the file or folder. 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
CTag ETag for the content of the item. This eTag is not changed if only the metadata is changed. String
ETag ETag for the entire item (metadata + content). String
Size Size of the item in bytes. Number

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.

  • Admins must be a member of the group.

Related topics

OneDrive connector

Elements of Workflows

Guidance for OneDrive connector

Microsoft Graph API documentation