> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Files

> List files and folders in a SharePoint document library or OneDrive folder

List files and folders in a SharePoint document library or OneDrive folder. Returns public temporary download URLs; use them exactly as returned because 'unauthorized' usually means the URL was altered.

| | |
| - | - |
| **App** | Microsoft SharePoint |
| **Operation ID** | `sharepoint_list_files` |
| **Type** | Action |
| **Connection** | `sharepoint` (required) |
| **Credits per run** | 1 |
| **Agent / MCP tool** | Yes |

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `site` | string or SelectItem | No | - | SharePoint site the document library belongs to, or 'me' for the user's own OneDrive. |
| `drive` | string or SelectItem | No | - | Document library (drive) to list files from. Not needed when folder\_path is a full SharePoint link. |
| `folder_path` | string | No | - | Folder path inside the library, e.g. 'Reports/2025', or a full SharePoint folder link copied from the browser. Leave empty to list the library root folder. |

### SelectItem

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `value` | string | Yes | - | The value of the selectable item. |
| `label` | string | Yes | - | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

## Output

**Type**: `List[Dict]`

Returns the files and folders in the selected location.

**Fields**: `file_id`, `file_name`, `file_url`, `file_type`, `is_folder`, `size`, `modified_at`, `download_url`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.