Actions16
Folder → Get Items
AI-generatedSummary
List all files and subfolders within a specified OneDrive for Business or SharePoint folder.
Inputs
- Drive Type — Select the type of drive: user OneDrive, SharePoint site drive, or a folder accessed via a sharing link.
- User ID — User email or ID. If empty, uses the authenticated user from the credential (only for User Drive).
- SharePoint Site (required) — Select a SharePoint site to access (only for Site Drive).
- Shared Folder URL — Paste a sharing link to access a specific folder (only for Shared Folder mode).
- Folder Selection (required) — Specify how to target the folder: browse (interactive), by path, or by ID.
- Folder Path — Enter the full folder path from root (e.g., /Documents/MyFolder).
- Folder ID — Enter the unique ID of the folder. Use "root" for the root folder.
- Level 1 Name or ID (required) — Select the first level of folders (browse mode). Can be an ID or expression.
- Level 2 Name or ID — Select a subfolder to go deeper. Leave as is to use Level 1 as the target.
- Level 3 Name or ID — Select a subfolder to go deeper. Leave as is to use Level 2 as the target.
- Level 4 Name or ID — Select a subfolder to go deeper. Leave as is to use Level 3 as the target.
- Level 5 Name or ID — Select the deepest target folder. Leave as is to use Level 4 as the target.
Output shape
a list of items, each representing a file or folder within the specified folder
The list is paginated automatically. Each item includes standard Microsoft Graph properties (id, name, folder, file, etc.) but only includes the 'folder' and 'file' objects for files and folders. Use 'Continue on Fail' for large folders to prevent timeouts.
Examples
Example 1: List files in a user's OneDrive root folder
Drive Type: User Drive; Folder Selection: By Path; Folder Path: /
Example 2: List folders in a SharePoint site library
Drive Type: SharePoint Site Drive; SharePoint Site: From List; Folder Selection: By Path; Folder Path: /Documents
Example 3: List items in a shared folder using a link
Drive Type: Shared Folder (Link); Shared Folder URL: https://1drv.ms/...; Folder Selection: By Path; Folder Path: /